Skip to content

Commit a06a1fc

Browse files
committed
use arg_type.annotation instead of arg_type._annotation
1 parent 7b34a24 commit a06a1fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sphinx_autodoc_typehints/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ def _inject_signature( # noqa: C901
718718
type_aliases = app.config["autodoc_type_aliases"]
719719

720720
for arg_name, arg_type in signature.parameters.items():
721-
annotation = arg_type._annotation if arg_type._annotation in type_aliases else type_hints.get(arg_name)
721+
annotation = arg_type.annotation if arg_type.annotation in type_aliases else type_hints.get(arg_name)
722722

723723
default = signature.parameters[arg_name].default
724724

0 commit comments

Comments
 (0)