-
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
Ruff rule does not describe multiple rules #5495
Comments
Behavior has changed since #2812 was reported. Not sure if current behavior is intentional. |
My initial preference would be to error on |
@charliermarsh erroring would be good. Even better would be showing the list of rules it expands to (just the ID and short name is plenty useful!) |
The behavior got changed in ❯ pipx run "ruff==0.0.246" rule E4
⚠️ ruff is already on your PATH and installed at /Users/dhruv/.local/bin/ruff. Downloading and running anyway.
error: invalid value 'E4' for '<RULE>': unknown rule code
For more information, try '--help'. I think it might be related to the |
@dhruvmanila - Are you taking a look at the lack of an error? |
You can look at it if you want, I just thought to perform a quick bisection search to find out when did the behavior changed. |
I'll take a quick look. |
Closes #5495, but there's a TODO here to improve this further. The current `from_code` implementation feels really indirect.
version = 0.0.272
Flake8 supports providing a partial error code like "E4" to select all error codes starting with "E4" (i.e. E401 and E402)
ruff . --select E4
runs both E401 and E402.But
ruff rule E4
describes E401 and does not even mention that "E4" also entails E402.The text was updated successfully, but these errors were encountered: