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

Respect Q00* ignores in flake8-quotes rules #10728

Merged
merged 1 commit into from Apr 2, 2024
Merged

Respect Q00* ignores in flake8-quotes rules #10728

merged 1 commit into from Apr 2, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Apr 2, 2024

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:

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:

'''
bad docsting
'''
a = 'single'
b = '''
bad multi line
'''

@charliermarsh charliermarsh added the bug Something isn't working label Apr 2, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) April 2, 2024 03:12
@charliermarsh charliermarsh merged commit 7b48443 into main Apr 2, 2024
17 checks passed
@charliermarsh charliermarsh deleted the charlie/q branch April 2, 2024 03:21
Copy link

github-actions bot commented Apr 2, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+0 -1 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

indico/indico (+0 -1 violations, +0 -0 fixes)

- indico/modules/admin/notices.py:40:1: UP042 Class NoticeSeverity inherits from both `str` and `enum.Enum`. Prefer `enum.StrEnum` instead.

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
UP042 1 0 1 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -1 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

indico/indico (+0 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

- indico/modules/admin/notices.py:40:1: UP042 Class NoticeSeverity inherits from both `str` and `enum.Enum`. Prefer `enum.StrEnum` instead.

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
UP042 1 0 1 0 0

@dhruvmanila
Copy link
Member

Thank you!

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 this pull request may close these issues.

Q000, Q001, Q002 can't be ignored in Ruff 0.3.5
2 participants