MAINT: Consolidate Ruff per-file-ignores; drop dead pyrit/ui config#2098
Merged
romanlutz merged 1 commit intoJun 29, 2026
Merged
Conversation
… config
Merge the redundant `pyrit/{auxiliary_attacks,ui}` entry into the single `pyrit/auxiliary_attacks/**/*.py` entry by adding N and PERF (the only codes not already subsumed by its D/DOC/A prefixes). Remove the `pyrit/ui/**/*.py` entry and the ui branch of the combined pattern as dead config (pyrit/ui/ does not exist).
Behavior-preserving: Ruff's resolved per-file-ignores for an auxiliary_attacks file are byte-identical (86 expanded codes) before and after, and `ruff check pyrit/auxiliary_attacks pyrit/backend` reports the same results.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jsong468
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
[tool.ruff.lint.per-file-ignores]table had grown redundant and partly stale. This is a pure, behavior-preserving cleanup of that table; it does not change what gets linted anywhere.Specifically:
"pyrit/{auxiliary_attacks,ui}/**/*.py"entry. Ruff unions ignores across all matching patterns, so its granularD1xx/D4xx/DOCxxxcodes were already covered by the dedicatedauxiliary_attacksentry'sD/DOCprefixes. Its only non-redundant codes,NandPERF, were folded into that entry, which is now["A", "B905", "D", "DOC", "N", "PERF", "SIM101", "SIM108"]."pyrit/ui/**/*.py"entry.pyrit/ui/does not exist, so both it and theuibranch of the combined pattern matched zero files.Net effect: three lines removed and one entry updated, while
auxiliary_attacks(vendored GCG attack code) keeps the exact same effective ignore set.Tests and Documentation
Config-only change; no code, tests, or docs are affected, and JupyText is not applicable.
Behavior was verified unchanged two independent ways:
ruff check --show-settings) before and after. The effective ignore set for anauxiliary_attacksfile is byte-identical (the same 86 fully-expanded rule codes), and every other matcher (doc, backend, tests, etc.) is unchanged.ruff check pyrit/auxiliary_attacks pyrit/backend --statisticsreturns identical results before and after (the same 9 pre-existing D421 inpyrit/backend, which are out of scope for this PR).