Skip to content

Respect Q00* ignores in flake8-quotes rules#10728

Merged
charliermarsh merged 1 commit intomainfrom
charlie/q
Apr 2, 2024
Merged

Respect Q00* ignores in flake8-quotes rules#10728
charliermarsh merged 1 commit intomainfrom
charlie/q

Conversation

@charliermarsh
Copy link
Copy Markdown
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
@charliermarsh charliermarsh deleted the charlie/q branch April 2, 2024 03:21
@github-actions
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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