bugGNU nano - Bugs: bug #62057, with modern pyflakes: got 0...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62057: with modern pyflakes: got 0 parsable lines from command

Submitter:  davidhcefx <davidhcefx>
Submitted:  Tue 15 Feb 2022 06:52:03 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Fri 18 Feb 2022 03:48:03 PM UTC, comment #6: 

Released in nano-6.2.

Benno Schulenberg <bens>
Group administrator
Thu 17 Feb 2022 03:40:46 PM UTC, comment #5: 

Fixed in git, commit 8fccb314, by assuming there is always a space between the position indication and the actual message.

Thanks for reporting.

Benno Schulenberg <bens>
Group administrator
Wed 16 Feb 2022 02:26:50 PM UTC, comment #4: 

Attached patch should fix the issue.  Please verify.

(file #52865)

Benno Schulenberg <bens>
Group administrator
Wed 16 Feb 2022 12:18:51 PM UTC, comment #3: 

Opps, I tried on version 5.4. I should have also tried on the newest code.


@@ -2655 +2655 @@ void do_linter(void)
-                               if (strstr(message, ": ") != NULL) {
+                               if (strstr(message, ":") != NULL) {
@@ -2687 +2687 @@ void do_linter(void)
-                                                       curlint->msg = copy_of(strstr(message, ": ") + 2);
+                                                       curlint->msg = copy_of(strstr(message, ":") + 2);


davidhcefx <davidhcefx>
Wed 16 Feb 2022 10:24:09 AM UTC, comment #2: 

Have you actually tried your proposed change?  It won't work.

Anyway, I see that pyflakes changed their output format in 2.2.0, adding the column information but not followed by a colon.  Sigh...

Benno Schulenberg <bens>
Group administrator
Tue 15 Feb 2022 07:05:14 PM UTC, comment #1: 

To be precise, I mean to modify line 2655:

@@ -2655 +2655 @@ void do_linter(void)
-                               if (strstr(message, ": ") != NULL) {
+                               if (strstr(message, ":") != NULL) {

davidhcefx <davidhcefx>
Tue 15 Feb 2022 06:52:03 PM UTC, original submission:  

Hello,

I received "Get 0 parsable lines from command: pyflakes" when linting a python file. However, if I run pyflakes from the command line, it did spitted something:


$ pyflakes a.py
a.py:1:1 'readline' imported but unused
a.py:3:1 syntax error in forward annotation 'no return'
a.py:5:11 '...' % ... has 1 placeholder(s) but 2 substitution(s)
a.py:6:5 assertion is always true, perhaps remove parentheses?

$ pyflakes --version
2.4.0 Python 3.6.9 on Linux


Although the comments in the code said:


/* The recognized format is "filename:line:column: message",
 * where ":column" may be absent or be ",column" instead. */


wouldn't it be nice if we relax the format to  filename:line:column:message, where the space after the colon is optional? This can be simply achieved by
modifying the line right below the comments.

Regards,
David

davidhcefx <davidhcefx>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by davidhcefx (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-02-18 bens Open/ClosedOpen Closed
    2022-02-17 bens StatusIn Progress Fixed
    2022-02-16 bens Attached File- Added adjust-for-newer-pyflakes.patch, #52865
        Severity2 - Minor 3 - Normal
        StatusNone In Progress
        Assigned toNone bens
    2022-02-16 bens Summarywith modern pyflake: got 0 parsable lines from command with modern pyflakes: got 0 parsable lines from command
    2022-02-16 bens Severity3 - Normal 2 - Minor
        SummaryGet 0 parsable lines from command: pyflakes with modern pyflake: got 0 parsable lines from command

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code