Summary
README.md and CLAUDE.md both advertise mypy --strict cleanliness. mypy recost/ reports 35 errors across 6 files.
Highlights:
_interceptor.py — latency_ms: int parameter receives a float from (time.perf_counter() - start) * 1000.
frameworks/flask.py:33 — self._handle = None is inferred as None; reassignment to RecostHandle in init_app fails.
- Stale
# type: ignore comments flagged as unused.
Fix
Decide on the actual mypy contract. Either run mypy in CI and fix the 35 errors, or drop the strict-clean claim from the README. The first option is correct.
Files
recost/_interceptor.py
recost/frameworks/flask.py
- others
README.md
pyproject.toml (mypy config)
- CI workflow
Priority
P0 — the public posture is false; type errors prevent reliable refactoring.
Summary
README.mdandCLAUDE.mdboth advertisemypy --strictcleanliness.mypy recost/reports 35 errors across 6 files.Highlights:
_interceptor.py—latency_ms: intparameter receives afloatfrom(time.perf_counter() - start) * 1000.frameworks/flask.py:33—self._handle = Noneis inferred asNone; reassignment toRecostHandleininit_appfails.# type: ignorecomments flagged as unused.Fix
Decide on the actual mypy contract. Either run mypy in CI and fix the 35 errors, or drop the strict-clean claim from the README. The first option is correct.
Files
recost/_interceptor.pyrecost/frameworks/flask.pyREADME.mdpyproject.toml(mypy config)Priority
P0 — the public posture is false; type errors prevent reliable refactoring.