Skip to content

Commit 6650bf8

Browse files
update
1 parent 271114a commit 6650bf8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/typeapi/typehint.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def _make_wrapper(cls, hint: object, source: "Any | None") -> "TypeHint":
9393
elif origin == tuple:
9494
return TupleTypeHint(hint, source)
9595

96-
elif origin is None and type(hint).__name__ == "_TypeAliasBase": # Python <3.10
96+
elif origin is None and type(hint).__name__ == "_TypeAliasBase": # Python 3.6
97+
return TypeAliasTypeHint(hint, source)
98+
elif origin is None and getattr(hint, "_name") == "TypeAlias": # Python <3.10
9799
return TypeAliasTypeHint(hint, source)
98100
elif origin is None and getattr(hint, "__name__", None) == "TypeAlias": # Python >=3.10
99101
return TypeAliasTypeHint(hint, source)

0 commit comments

Comments
 (0)