Subcategory: Linting/style
Score: contributes 4 → 10
Two FastAPI exception handlers declare arguments they never use. FastAPI requires the (request, exc) signature, so the fix is to prefix the unused one with an underscore (or add a targeted # noqa: ARG001 if the framework contract makes the name meaningful).
What to change
src/pycharting/core/server.py:213 — not_found_handler, unused exc
src/pycharting/core/server.py:220 — server_error_handler, unused request
Best done together with the annotation work on the same two handlers.
done when
ruff reports no ARG001 and both handlers still respond correctly (covered by tests/pycharting/core/test_server.py:159,165).
Evidence
ARG001 Unused function argument: `request`
--> src/pycharting/core/server.py:220:36
Surfaced by the Rhiza quality gates during the template bump to jebel-quant/rhiza@v1.2.2, which enabled the stricter ruff rule families (ANN, A, BLE, ARG) and TYPECHECKER=both. Gate status at time of filing: make fmt FAIL, make typecheck FAIL, make docs-coverage FAIL, test-layout FAIL; make deptry, make security, make test PASS (154 tests, 100% coverage).
Subcategory: Linting/style
Score: contributes 4 → 10
Two FastAPI exception handlers declare arguments they never use. FastAPI requires the
(request, exc)signature, so the fix is to prefix the unused one with an underscore (or add a targeted# noqa: ARG001if the framework contract makes the name meaningful).What to change
src/pycharting/core/server.py:213—not_found_handler, unusedexcsrc/pycharting/core/server.py:220—server_error_handler, unusedrequestBest done together with the annotation work on the same two handlers.
done when
ruffreports no ARG001 and both handlers still respond correctly (covered bytests/pycharting/core/test_server.py:159,165).Evidence
Surfaced by the Rhiza quality gates during the template bump to
jebel-quant/rhiza@v1.2.2, which enabled the stricter ruff rule families (ANN, A, BLE, ARG) andTYPECHECKER=both. Gate status at time of filing:make fmtFAIL,make typecheckFAIL,make docs-coverageFAIL, test-layout FAIL;make deptry,make security,make testPASS (154 tests, 100% coverage).