Skip to content

Remove support for type comments #13743

@AA-Turner

Description

@AA-Turner

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

Sphinx has supported # type: ... comments in autodoc for several years (#2755, #6984). Recently, we have gained support for .pyi stub files (#7630, #13253, #4824). Type comments are primarily useful for supporting both Python 2 and 3; the former has been end-of-life for over five years. For modern situations where inline annotations aren't acceptable or can't be used (e.g. extension modules), .pyi files can be used.

Describe the solution you'd like

Remove support for parsing type comments in Sphinx.

Describe alternatives you've considered

The status quo.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions