SublimeLinter / SublimeLinter-flake8

SublimeLinter plugin for python, using flake8.
MIT License
184 stars 28 forks source link

Shows E251 for function definitions having type annotations #117

Closed siddhpant closed 3 years ago

siddhpant commented 3 years ago

Basically what the title says - E251 shown with error symbols on the definition's line. I am on Sublime Text 4 and installed the package from Package Control.

For example:

image

Running flake8 from command line shows no error. Here's the verbose output:

flake8.plugins.manager    MainProcess     99 INFO     Loading entry-points for "flake8.extension".
flake8.plugins.manager    MainProcess    279 INFO     Loading entry-points for "flake8.report".
flake8.plugins.manager    MainProcess    453 INFO     Loading plugin "C90" from entry-point.
flake8.plugins.manager    MainProcess    459 INFO     Loading plugin "F" from entry-point.
flake8.plugins.manager    MainProcess    487 INFO     Loading plugin "pycodestyle.ambiguous_identifier" from entry-point.
flake8.plugins.manager    MainProcess    499 INFO     Loading plugin "pycodestyle.bare_except" from entry-point.
flake8.plugins.manager    MainProcess    499 INFO     Loading plugin "pycodestyle.blank_lines" from entry-point.
flake8.plugins.manager    MainProcess    499 INFO     Loading plugin "pycodestyle.break_after_binary_operator" from entry-point.
flake8.plugins.manager    MainProcess    499 INFO     Loading plugin "pycodestyle.break_before_binary_operator" from entry-point.
flake8.plugins.manager    MainProcess    499 INFO     Loading plugin "pycodestyle.comparison_negative" from entry-point.
flake8.plugins.manager    MainProcess    499 INFO     Loading plugin "pycodestyle.comparison_to_singleton" from entry-point.
flake8.plugins.manager    MainProcess    499 INFO     Loading plugin "pycodestyle.comparison_type" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.compound_statements" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.continued_indentation" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.explicit_line_join" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.extraneous_whitespace" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.imports_on_separate_lines" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.indentation" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.maximum_doc_length" from entry-point.
flake8.plugins.manager    MainProcess    500 INFO     Loading plugin "pycodestyle.maximum_line_length" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.missing_whitespace" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.missing_whitespace_after_import_keyword" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.missing_whitespace_around_operator" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.module_imports_on_top_of_file" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.python_3000_async_await_keywords" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.python_3000_backticks" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.python_3000_has_key" from entry-point.
flake8.plugins.manager    MainProcess    501 INFO     Loading plugin "pycodestyle.python_3000_invalid_escape_sequence" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.python_3000_not_equal" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.python_3000_raise_comma" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.tabs_obsolete" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.tabs_or_spaces" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.trailing_blank_lines" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.trailing_whitespace" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.whitespace_around_comma" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.whitespace_around_keywords" from entry-point.
flake8.plugins.manager    MainProcess    502 INFO     Loading plugin "pycodestyle.whitespace_around_named_parameter_equals" from entry-point.
flake8.plugins.manager    MainProcess    503 INFO     Loading plugin "pycodestyle.whitespace_around_operator" from entry-point.
flake8.plugins.manager    MainProcess    503 INFO     Loading plugin "pycodestyle.whitespace_before_comment" from entry-point.
flake8.plugins.manager    MainProcess    503 INFO     Loading plugin "pycodestyle.whitespace_before_parameters" from entry-point.
flake8.plugins.manager    MainProcess    503 INFO     Loading plugin "default" from entry-point.
flake8.plugins.manager    MainProcess    504 INFO     Loading plugin "pylint" from entry-point.
flake8.plugins.manager    MainProcess    504 INFO     Loading plugin "quiet-filename" from entry-point.
flake8.plugins.manager    MainProcess    504 INFO     Loading plugin "quiet-nothing" from entry-point.
flake8.options.manager    MainProcess    504 WARNING  option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
flake8.checker            MainProcess    508 INFO     Making checkers
flake8.checker            MainProcess    512 INFO     Checking 1 files
flake8.main.application   MainProcess    522 INFO     Finished running
flake8.main.application   MainProcess    522 INFO     Reporting errors
flake8.main.application   MainProcess    523 INFO     Found a total of 0 violations and reported 0
siddhpant commented 3 years ago

I had updated from st3. I fixed this after refreshing my st4 install (renaming existing folder from .local and starting afresh). It also fixed another problem with the tab key not indenting.

I don't know why this happened, it didn't happen earlier, hence keeping the issue open.

kaste commented 3 years ago

It looks like it ran with an old flake8/python not supporting the annotations syntax. We can't know as you did not post the actual output/errors from flake8. (For example, the error messages from the SublimeLinter error panel; or the same in the tooltip/popups.)

Closing as you somehow solved it.