-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Milestone
Description
Describe the bug
With autodoc_typehints = 'description', the parameter type annotations of the constructor (__init__) of generic classes are missing from the description.
How to Reproduce
With autodoc_typehints = 'description' in conf.py,
from typing import *
#: whatever
T = TypeVar('T')
class Dummy(Generic[T]):
r"""
Arguments:
arg: missing type annotation
"""
def __init__(self, arg: str):
passresults in
in which the type annotation is missing for the arg parameter.
Expected behavior
The type annotations should not be missing.
Your project
N/A
Screenshots
No response
OS
Ubuntu 20.04
Python version
3.8.10
Sphinx version
5.0.2
Sphinx extensions
sphinx.ext.autodoc
Extra tools
No response
