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

Flake8 reports wrong severity level for code Fxxx #230

Closed
lcheylus opened this issue Jun 28, 2022 · 2 comments · Fixed by #234
Closed

Flake8 reports wrong severity level for code Fxxx #230

lcheylus opened this issue Jun 28, 2022 · 2 comments · Fixed by #234
Milestone

Comments

@lcheylus
Copy link
Contributor

lcheylus commented Jun 28, 2022

Flake8 uses Fxxx for error codes generated by PyFlakes, see https://flake8.pycqa.org/en/latest/user/error-codes.html and https://flake8.pycqa.org/en/latest/glossary.html#term-error-code

Currently, these error codes are reported with the Warning severity level by Flake8 plugin instead of Error level, same issue as #220 for E999 code.

For now, I have to keep pycodestyle, PyFlakes and McCabe plugins in my LSP client configuration instead of using Flake8 plugin, to have the correct Warning/Error codes.

@jhossbach
Copy link
Member

You're right, it should be sufficient to include all F codes as errors and only consider E999 as error. I'll make a PR for that

@lcheylus
Copy link
Contributor Author

I'm currently pushing my PR for this issue.

lcheylus added a commit to lcheylus/python-lsp-server that referenced this issue Jun 30, 2022
Error codes from Flake8 :
  - Fxxx : checks from PyFlakes => Error severity level
  - E999 : code for invalid AST => Error severity level
  - Exxx : checks from pydocstyle (syntax checks for PEP-8) => Warning
    severity level
  - Wxxx : checks from pydocstyle (syntax checks for PEP-8) => Warning
    severity level

Closes python-lsp#230
Fix PR python-lsp#223
@ccordoba12 ccordoba12 added this to the v1.5.0 milestone Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants