-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Milestone
Description
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
- Support for Python 2/3 "straddling" type hint comments #2755
- Close #2755: autodoc: Support type_comment style annotation #6984
- would close autofunction does not support type comment for class object #7639
- would close autodoc_typehints="description" doesn't fully resolve constructor type hints from type comments #8243 (cc @godlygeek)
- [BUG] PropertyDocumenter does not add annotation from type comment #11277 (cc @picnixz)
timhoffm and vivodiPaebbels