Skip to content

Annotate public functions and parametrize bare list types across src/pycharting/ #11

Description

@tschm

Subcategory: Type safety (3→8) and Linting/style (4→7) — clears the dominant cause of both currently-failing quality gates.

Problem. make typecheck (mypy --strict) reports 59 errors and make fmt (ruff) reports missing-annotation errors, largely from the same root: public/async functions without annotations and bare list used as a type argument.

Files / lines to change:

  • src/pycharting/api/routes.py:32-40 (bare list), :54,100,171,193,217 (missing return types)
  • src/pycharting/api/interface.py:36-43 (bare list)
  • src/pycharting/data/ingestion.py:33,35,67,244,246,301 (bare list), :363 (untyped slice_opt)
  • src/pycharting/core/server.py:207,213,220 and core/lifecycle.py:237,242 (untyped defs/params)
  • demo.py:45 (generate_ohlc missing return type)

Done when: make typecheck and make fmt both pass with no ANN* / type-arg / no-untyped-def errors.

Evidence: mypy --strict … Found 59 errors in 5 files; ruff ANN201 Missing return type annotation, Missing type arguments for generic type "list".

Broader superset of #8 (which covered only stop_server/_repr_html_, now auto-fixed). Context: $PR

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