-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 more native support #18261
Comments
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue. |
@karthiknadig I've asked rude russian python community (yes, it exists :) ) about this feature, and, as I see, community supports this :) |
Related #17235 |
We have a prototype for flake8 behind LSP that adds ability to control severity by error code. Instructions to get it and use it are here: PyCQA/flake8#1467 (comment) Please leave your feedback on this here: #17235 |
@karthiknadig I'll check in a few days. Is it works together with python extension? Can I add flake8 plugin to LSP flake8? |
the flake8 extension can work with the python extension. By default, it uses You may want to disable linting with python extension, or you will see two items for each linting issue. |
1 case:
Expected:
Actual:
Status:
case 2:
Expected:
Actual:
Status:
case 3:
Expected:
Actual:
Status:
case 4
Expected:
Actual:
Status:
case 5
Expected:
Actual:
Status:
case 6
Expected:
Actual:
Status:
case 7
Expected:
Actual:
Status:
case 8
Expected:
Actual:
Status:
case 9
Expected:
Actual:
Status:
case 10:
Expected:
Actual:
Status:
case 11
Expected:
Actual:
Status:
Thanks for you work, really! Almost perfect! Just 4/11 are broken |
@Niccolum You can see the logic for severity in the
Then it does not know about def _get_severity(code, codeType, severity):
value = severity.get(code, None) or severity.get(codeType, "Error")
try:
return types.DiagnosticSeverity[value]
except Exception:
pass
return types.DiagnosticSeverity.Error Here code can take values like (F401, E302, E305), codeType can take values like (F, E, I, T, W), severity is literally what you set in the severity setting. In the above case |
Main logic with default "error" - is great. Why this doesn't work with T001? And what about, if I ignore main letter, but use some of them in config. For example
If we use next logic with default letters - we must duplicate flake8 config in vscode flake8Severity. I think it's a problem. Or I am wrong? UPD: |
Thank you to everyone who upvoted this issue! Since the community showed interest in this feature request we will leave this issue open as something to consider implementing at some point in the future. We do encourage people to continue 👍 the first/opening comment as it helps us prioritize our work based on what the community seems to want the most. |
We have a preview extension available now from marketplace: https://marketplace.visualstudio.com/items?itemName=ms-python.flake8 |
Good day. Thank you for your work with that beautiful plugin and vscode at all.
I newbie with vscode, but I found, that your plugin match only F, W and E error codes. I use a lot of flake8 plugins, which have another letter (or letters) for codes. Have you any plans to support absolutely custom codes, as user want? For example, dict with
code: level
match:Logs
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: