Skip to content

Type the session registry and route responses (drop dict[str, Any]) #49

Description

@tschm

Subcategory: Type safety
Score: 9 → 10 (target)

ty passes, but the session registry and several route/return types fall back to Any, weakening guarantees at the API boundary:

  • src/pycharting/api/routes.py:26_data_managers: dict[str, Any] (actually holds DataManager)
  • plot/route return values typed as dict[str, Any]

Suggested fix: type the registry as dict[str, DataManager] and model the responses (Pydantic model or TypedDict) instead of dict[str, Any].

Done when: the registry and route responses use concrete types and make typecheck stays clean.

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