Skip to content

Commit 30dcfe1

Browse files
committed
_get_type_hint(): fixed the type hint of localns arg
1 parent 250c73a commit 30dcfe1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/sphinx_autodoc_typehints/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,7 @@ def _resolve_type_guarded_imports(autodoc_mock_imports: list[str], obj: Any) ->
479479
_execute_guarded_code(autodoc_mock_imports, obj, module_code)
480480

481481

482-
def _get_type_hint(
483-
autodoc_mock_imports: list[str], name: str, obj: Any, localns: TypeAliasForwardRef
484-
) -> dict[str, Any]:
482+
def _get_type_hint(autodoc_mock_imports: list[str], name: str, obj: Any, localns: TypeAliasNamespace) -> dict[str, Any]:
485483
_resolve_type_guarded_imports(autodoc_mock_imports, obj)
486484
try:
487485
result = get_type_hints(obj, None, localns)

0 commit comments

Comments
 (0)