Commit eb9ea94
refactor phase 6: TRY003 narrow ignore; per-line TRY301 exception
The ARCPError exception class already carries typed structure (a
`code: ErrorCode` enum field plus a `details: dict`); the human-readable
message is intentionally a free-form string, not a per-error subclass.
TRY003 ("avoid long messages outside the exception class") doesn't fit
this design, so add it as a narrow project-level ignore with the
rationale captured inline. The same justification covers TransportClosed
("transport is closed", "websocket closed", etc.) and the two pydantic
field-validator ValueErrors in envelope.py.
For TRY301 in runtime.server cancel-handler: the raise-inside-try is
deliberate so a single except clause normalizes both validation-thrown
and explicit-raised ARCPError into one cancel.refused envelope. Add a
per-line noqa with the reason.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4bfa618 commit eb9ea94
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
0 commit comments