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 Severity too high #256

Closed
nexplor opened this issue Aug 27, 2022 · 4 comments · Fixed by #490
Closed

Flake8 Severity too high #256

nexplor opened this issue Aug 27, 2022 · 4 comments · Fixed by #490
Labels
bug Something isn't working
Milestone

Comments

@nexplor
Copy link

nexplor commented Aug 27, 2022

After #234, all Flake8 codes starting with "F" are reported with error severity. This is overly high: the only codes that really errors are F821, F823, F831, and maybe F405 and F822.

Can we add explicit checks for error codes to classify them as errors vs. warnings?

@ccordoba12
Copy link
Member

Hey @nexplor, thanks for reporting. I have no problem with that, so please submit a pull request to provide more fine-grained error reports from Flake8.

@jhossbach
Copy link
Member

I feel troubled by this: Flake8 is really not designed to fine-grain all errors. Similar to the above, e.g. F501, F521 and F721 would need to be declared as errors. So either we carefully design the severeness of all error codes or we convince the flake8 maintainers to make the error codes more meaningful. You might consider using pycodestyle, mccabe and pyflakes separately as they support better fine-graining.

@jhossbach
Copy link
Member

FYI python-lsp-ruff allows customizing of severities as of v1.5.0 (although only on a per-code level, and it does not accept regex patterns)

@ccordoba12
Copy link
Member

That would be a good enough solution here too. But I guess you're interested in giving us a hand with it for Flake8, right?

@ccordoba12 ccordoba12 added this to the v1.9.1 milestone Nov 20, 2023
@ccordoba12 ccordoba12 added the bug Something isn't working label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants