Skip to content

autodoc: Add support for PEP 695's explicit type aliases #11561

Open
@cspotcode

Description

@cspotcode

Is your feature request related to a problem? Please describe.

sphinx cannot document typing.TypeAliasType nor typing_extensions.TypeAliasType.

https://peps.python.org/pep-0695/

Describe the solution you'd like

automodule should document exported TypeAliasTypes without needing a preceding #: comment, the same way that classes and functions do not need a preceding #:.

References to such a type used in the signatures of other functions, types, classes, etc should hyperlink to the type's declaration, the same way that references to a class will hyperlink to the declaration of that class.

The declaration should render similar to how older style type aliases render today, saying "alias of ..."

Describe alternatives you've considered

Additional context

#8934
#11438

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions