Subcategory: Linting/style + Type safety
Score: linting 4 → ~7, type safety 3 → ~5
This is the highest-leverage single change in the batch: the missing annotations are counted by both gates — 17 ANN* errors in make fmt and 13 no-untyped-def/no-untyped-call errors in mypy --strict are the same defect seen by two tools.
What to change
src/pycharting/core/server.py:30 — NoCacheStaticFiles.get_response, arg scope
src/pycharting/core/server.py:207 — health_check return type
src/pycharting/core/server.py:213 — not_found_handler(request, exc) → (request: Request, exc: Exception) -> JSONResponse
src/pycharting/core/server.py:220 — server_error_handler(request, exc) → same
src/pycharting/core/lifecycle.py:237 — __enter__ → -> "ChartServer"
src/pycharting/core/lifecycle.py:242 — __exit__, plus its three params (exc_type, exc_val, exc_tb)
src/pycharting/api/routes.py:96 — get_data return type
src/pycharting/data/ingestion.py:363 — slice_opt(arr)
demo.py:45 — generate_ohlc
done when
ruff reports no ANN001/ANN201/ANN202/ANN204, and mypy --strict reports no no-untyped-def or no-untyped-call.
Evidence
ANN204 Missing return type annotation for special method `__enter__`
--> src/pycharting/core/lifecycle.py:237:9
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 + Type safety
Score: linting 4 → ~7, type safety 3 → ~5
This is the highest-leverage single change in the batch: the missing annotations are counted by both gates — 17
ANN*errors inmake fmtand 13no-untyped-def/no-untyped-callerrors inmypy --strictare the same defect seen by two tools.What to change
src/pycharting/core/server.py:30—NoCacheStaticFiles.get_response, argscopesrc/pycharting/core/server.py:207—health_checkreturn typesrc/pycharting/core/server.py:213—not_found_handler(request, exc)→(request: Request, exc: Exception) -> JSONResponsesrc/pycharting/core/server.py:220—server_error_handler(request, exc)→ samesrc/pycharting/core/lifecycle.py:237—__enter__→-> "ChartServer"src/pycharting/core/lifecycle.py:242—__exit__, plus its three params (exc_type,exc_val,exc_tb)src/pycharting/api/routes.py:96—get_datareturn typesrc/pycharting/data/ingestion.py:363—slice_opt(arr)demo.py:45—generate_ohlcdone when
ruffreports no ANN001/ANN201/ANN202/ANN204, andmypy --strictreports nono-untyped-deforno-untyped-call.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).