We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfb41d7 commit 2dee537Copy full SHA for 2dee537
src/sphinx_autodoc_typehints/__init__.py
@@ -718,7 +718,11 @@ def _inject_signature( # noqa: C901
718
type_aliases = app.config["autodoc_type_aliases"]
719
720
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)
+ annotation = (
722
+ ForwardRef(arg_type.annotation, is_argument=True, is_class=False)
723
+ if arg_type.annotation in type_aliases
724
+ else type_hints.get(arg_name)
725
+ )
726
727
default = signature.parameters[arg_name].default
728
0 commit comments