Context
From the Rhiza quality assessment (all 7 gates pass; overall ~9.2/10). make suppression-audit reports Grade C (51 suppressions, density 1.07/100 lines). The largest avoidable group is noqa[TRY003] — 16 occurrences (31%): long exception messages written inline at the raise site.
The subprocess-related suppressions (noqa[S603] 45%, nosec[B404]/[B603]) are inherent to wrapping the git CLI and are out of scope here.
Subcategory / score
Linting/style 9 → 10; also lifts Dependency/security-hygiene and the suppression grade C → B.
Where
The 16 # noqa: TRY003 sites, including:
src/rhiza/models/_git_utils.py:72
src/rhiza/models/bundle.py:46
- plus sites in
src/rhiza/commands/init.py and src/rhiza/commands/summarise.py
(full list: make suppression-audit)
Proposed fix
Extract long messages into custom exception classes or module-level constants so the raise lines no longer trip TRY003, removing the noqa.
Acceptance criterion
Done when make suppression-audit shows no TRY003 entries and the grade improves, and make fmt / make test stay green.
Scope: locally-owned (src/). Not Rhiza-managed.
Context
From the Rhiza quality assessment (all 7 gates pass; overall ~9.2/10).
make suppression-auditreports Grade C (51 suppressions, density 1.07/100 lines). The largest avoidable group isnoqa[TRY003]— 16 occurrences (31%): long exception messages written inline at theraisesite.The subprocess-related suppressions (
noqa[S603]45%,nosec[B404]/[B603]) are inherent to wrapping thegitCLI and are out of scope here.Subcategory / score
Linting/style 9 → 10; also lifts Dependency/security-hygiene and the suppression grade C → B.
Where
The 16
# noqa: TRY003sites, including:src/rhiza/models/_git_utils.py:72src/rhiza/models/bundle.py:46src/rhiza/commands/init.pyandsrc/rhiza/commands/summarise.py(full list:
make suppression-audit)Proposed fix
Extract long messages into custom exception classes or module-level constants so the
raiselines no longer tripTRY003, removing thenoqa.Acceptance criterion
Done when
make suppression-auditshows noTRY003entries and the grade improves, andmake fmt/make teststay green.Scope: locally-owned (
src/). Not Rhiza-managed.