-
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
Q000
, Q001
, Q002
can't be ignored in Ruff 0.3.5
#10724
Comments
Q000x
not working in Ruff 0.3.5Q00x
not working in Ruff 0.3.5
+1, facing the same issue my [lint]
select = [
...
"Q", # flake8-quotes
...
]
ignore = [
...
"Q000", # don't be pedantic about 'string' / "string"
"Q001", # don't be pedantic about '''string''' / """string"""
...
] |
was testing the config, the following flags [lint]
select = [
"Q002", # flake8-quotes:bad-quotes-docstring
] but the following doesn't flag [lint]
select = [
...
#"Q", # flake8-quotes
"Q000",
"Q001",
"Q003",
"Q004",
...
]
ignore = [
...
"Q000", # don't be pedantic about 'string' / "string"
"Q001", # don't be pedantic about '''string''' / """string"""
...
] so it doesn't seem to be a problem with ignore, just with hope this helps you narrow down the issue! |
I think it's just an oversight in where we apply the ignores for those rules. I'll fix it now. Thanks! |
## Summary We lost the per-rule ignores when these were migrated to the AST, so if _any_ `Q` rule is enabled, they're now all enabled. Closes #10724. ## Test Plan Ran: ```shell ruff check . --isolated --select Q --ignore Q000 ruff check . --isolated --select Q --ignore Q001 ruff check . --isolated --select Q --ignore Q002 ruff check . --isolated --select Q --ignore Q000,Q001 ruff check . --isolated --select Q --ignore Q000,Q002 ruff check . --isolated --select Q --ignore Q001,Q002 ``` ...against: ```python ''' bad docsting ''' a = 'single' b = ''' bad multi line ''' ```
Fixed in the next release, sorry about that. |
Q00x
not working in Ruff 0.3.5Q000
, Q001
, Q002
can't be ignored in Ruff 0.3.5
In Ruff 0.3.5, if specifying to ignore one or two of the Q000, Q001, Q002 rules, they are not ignored.
However, if specifying to ignore all three of those rules, then it works as expected.
Reproduction code:
Running:
Output is:
If specifying to ignore all three of those rules, then it works as expected:
All checks passed!
.Please let me know if you need any clarification or have additional details to provide.
The text was updated successfully, but these errors were encountered: