Skip to content

Respect unused-noqa via per-file-ignores#9300

Merged
charliermarsh merged 1 commit intomainfrom
charlie/generic
Dec 28, 2023
Merged

Respect unused-noqa via per-file-ignores#9300
charliermarsh merged 1 commit intomainfrom
charlie/generic

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

Summary

If RUF100 is ignored via per-file-ignores, we need to avoid raising it. RUF100 has special "self-ignore" logic, since the rule itself deals with # noqa directives. This PR wires up per-file-ignores to that "self-ignore" logic.

Closes #9297.

@charliermarsh charliermarsh added the bug Something isn't working label Dec 28, 2023
@charliermarsh charliermarsh enabled auto-merge (squash) December 28, 2023 14:10
@charliermarsh charliermarsh merged commit e178d93 into main Dec 28, 2023
@charliermarsh charliermarsh deleted the charlie/generic branch December 28, 2023 14:15
@github-actions
Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 1 project error)

pypa/setuptools (error)

ruff failed
  Cause: 'quote-style = preserve' is a preview only feature. Run with '--preview' to enable it.

Linter (preview)

✅ ecosystem check detected no linter changes.

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.

per-file-ignores with ALL creates a false positive

1 participant