Skip to content

35 mypy strict errors — README claims strict-clean #2

@AndresL230

Description

@AndresL230

Summary

README.md and CLAUDE.md both advertise mypy --strict cleanliness. mypy recost/ reports 35 errors across 6 files.

Highlights:

  • _interceptor.pylatency_ms: int parameter receives a float from (time.perf_counter() - start) * 1000.
  • frameworks/flask.py:33self._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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Blocking / shipping brokenbugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions