Skip to content

Fix invalid SubplotSpec type alias and self._server None-annotation #12

Description

@tschm

Subcategory: Type safety (3→8).

Problem. SubplotSpec is a module-level value used as a type annotation, which mypy rejects as not-valid-as-a-type; and self._server is annotated/initialized as None but assigned a uvicorn.Server.

Files / lines to change:

  • src/pycharting/data/ingestion.py:34,190,245 — make SubplotSpec a proper alias (TypeAlias / type statement) so it is usable as a type.
  • src/pycharting/core/lifecycle.py:131,134 — annotate the server attribute as uvicorn.Server | None (initialized to None in __init__).

Done when: make typecheck reports no valid-type / assignment / attr-defined errors in those files.

Evidence: ingestion.py:34: error: Variable "…SubplotSpec" is not valid as a type; lifecycle.py:134: "None" has no attribute "run".

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