Skip to content

Parameterize the 22 bare list generics in type annotations #68

Description

@tschm

Subcategory: Type safety
Score: contributes 3 → 10 (largest single error group: 22 of 55)

mypy --strict rejects bare list in annotations. Parameterize each with the element type it actually carries (list[float], list[Any], etc.).

What to change

  • src/pycharting/api/routes.py:33,34,35,36,37,38,39,40,41 (9 occurrences, DataResponse fields)
  • src/pycharting/api/interface.py:76,77,78,79,80,81,83 (7 occurrences, plot signature)
  • src/pycharting/data/ingestion.py:33,35,67,244,246,301 (6 occurrences)

done when

mypy --strict reports no [type-arg] errors and make typecheck exits 0.

Evidence

src/pycharting/api/routes.py:33: error: Missing type arguments for generic type "list"  [type-arg]

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions