Skip to content

Support Python 3.12 TypeAlias syntax #3772

@JasonGrace2282

Description

@JasonGrace2282

Python 3.12 introduced some syntax to define TypeAlias's that looks like

type InteralPoint3D = npt.NDArray[ManimPointDType]

Annoyingly for us, this is represented in AST as a TypeAlias node instead of the AnnAssign node we're used to. As such, the autoaliasattr directive does not work with this syntax, and type aliases defined using this syntax are not documented.

While manim still has some time before Python 3.12 becomes the minimum supported version and we can begin using this syntax, it would be nice to have it implemented so that fewer worries occur when that eventually happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureAnything related to our infrastructure

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions