Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python.linting.flake8CategorySeverity.F should default to "Warning", not "Error" #815

Closed
danvk opened this issue Feb 17, 2018 · 3 comments
Closed
Assignees
Labels
area-linting bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@danvk
Copy link

danvk commented Feb 17, 2018

(Moving over from microsoft/vscode#43851)

With flake8, the "F*" issues are labeled as errors by default (https://code.visualstudio.com/docs/python/linting#_flake8).

I think this comes from a misunderstanding of what "F" (vs. "W" or "E") means in this context. For flake8, it means that these are issues flagged by pyflakes, rather than that these are fatal errors. See http://flake8.pycqa.org/en/latest/glossary.html#term-class

The upshot is that issues like unused imports are flagged as errors by default with pyflake, rather than as warnings. They should be warnings:

{
  "python.linting.flake8CategorySeverity.F": "Warning"
}
  • VSCode Version: Version 1.19.2 (1.19.2)
  • OS Version: macOS Sierra 10.12.6 (16G29)
@MikhailArkhipov MikhailArkhipov self-assigned this Feb 18, 2018
@MikhailArkhipov MikhailArkhipov added bug Issue identified by VS Code Team member as probable bug area-linting awaiting 2-PR labels Feb 18, 2018
@MikhailArkhipov MikhailArkhipov added this to the February 2018 milestone Feb 18, 2018
MikhailArkhipov pushed a commit that referenced this issue Feb 20, 2018
* Fix pylint search

* Handle quote escapes in strings

* Escapes in strings

* CR feedback

* Missing pip

* Test

* Tests

* Tests

* Mac python path

* Tests

* Tests

* Test

* "Go To Python object" doesn't work

* Proper detection and type population in virtual env

* Test fixes

* Simplify venv check

* Remove duplicates

* Test

* Discover pylintrc better + tests

* Undo change

* CR feedback

* Set interprereter before checking install

* Fix typo and path compare on Windows

* Rename method

* #815 - 'F' in flake8 means warning
@MikhailArkhipov
Copy link

7894ae6

MikhailArkhipov pushed a commit that referenced this issue Feb 21, 2018
* Fix pylint search

* Handle quote escapes in strings

* Escapes in strings

* CR feedback

* Missing pip

* Test

* Tests

* Tests

* Mac python path

* Tests

* Tests

* Test

* "Go To Python object" doesn't work

* Proper detection and type population in virtual env

* Test fixes

* Simplify venv check

* Remove duplicates

* Test

* Discover pylintrc better + tests

* Undo change

* CR feedback

* Set interprereter before checking install

* Fix typo and path compare on Windows

* Rename method

* #815 - 'F' in flake8 means warning

* 730 - same folder temp

* Properly resolve ~

* Test

* Test
MikhailArkhipov pushed a commit that referenced this issue Feb 21, 2018
* Fix pylint search

* Handle quote escapes in strings

* Escapes in strings

* CR feedback

* Missing pip

* Test

* Tests

* Tests

* Mac python path

* Tests

* Tests

* Test

* "Go To Python object" doesn't work

* Proper detection and type population in virtual env

* Test fixes

* Simplify venv check

* Remove duplicates

* Test

* Discover pylintrc better + tests

* Undo change

* CR feedback

* Set interprereter before checking install

* Fix typo and path compare on Windows

* Rename method

* #815 - 'F' in flake8 means warning

* 730 - same folder temp

* Properly resolve ~

* Test

* Test

* Fix dot spacing

* Remove banner

* Delete banner code
MikhailArkhipov pushed a commit that referenced this issue Feb 22, 2018
* Fix pylint search

* Handle quote escapes in strings

* Escapes in strings

* CR feedback

* Missing pip

* Test

* Tests

* Tests

* Mac python path

* Tests

* Tests

* Test

* "Go To Python object" doesn't work

* Proper detection and type population in virtual env

* Test fixes

* Simplify venv check

* Remove duplicates

* Test

* Discover pylintrc better + tests

* Undo change

* CR feedback

* Set interprereter before checking install

* Fix typo and path compare on Windows

* Rename method

* #815 - 'F' in flake8 means warning

* 730 - same folder temp

* Properly resolve ~

* Test

* Test

* Fix dot spacing

* Remove banner

* Delete banner code

* Add pyenv and direnv folders

* Basic venv path search tests

* PYENV_ROOT resolution

* PYENV_ROOT test

* Use ICurrentProcess

* Fix travis
MikhailArkhipov pushed a commit that referenced this issue Feb 26, 2018
* Fix pylint search

* Handle quote escapes in strings

* Escapes in strings

* CR feedback

* Missing pip

* Test

* Tests

* Tests

* Mac python path

* Tests

* Tests

* Test

* "Go To Python object" doesn't work

* Proper detection and type population in virtual env

* Test fixes

* Simplify venv check

* Remove duplicates

* Test

* Discover pylintrc better + tests

* Undo change

* CR feedback

* Set interprereter before checking install

* Fix typo and path compare on Windows

* Rename method

* #815 - 'F' in flake8 means warning

* 730 - same folder temp

* Properly resolve ~

* Test

* Test

* Fix dot spacing

* Remove banner

* Delete banner code

* Add pyenv and direnv folders

* Basic venv path search tests

* PYENV_ROOT resolution

* PYENV_ROOT test

* Use ICurrentProcess

* Initial

* Second

* Display name

* Simplify and clean

* Test

* Test

* Tests

* Performance

* Test fixes

* venv folder settings

* Fix typo
@brettcannon
Copy link
Member

brettcannon commented Mar 6, 2018

I'm re-opening this issue as this shifts things for all flake8 checkers since the E class of errors come from pycodestyle which are stylistic and not actual errors either. So if we're now shifting F to be warnings then E should be as well and the only thing that should be an error is E999 errors.

@brettcannon brettcannon reopened this Mar 6, 2018
@brettcannon
Copy link
Member

There's also the issue that only some of the pyflakes errors are not errors in the classical sense. For instance, all of the F7 codes are actual errors. There's also the issue that E999 is the catch-all error for syntax errors, but the rest of the E rules are actually from pycodestyle which are definitely not errors.

@brettcannon brettcannon self-assigned this Mar 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants