Skip to content

Commit a2ee570

Browse files
fix
1 parent 6650bf8 commit a2ee570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/typeapi/typehint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def _make_wrapper(cls, hint: object, source: "Any | None") -> "TypeHint":
9595

9696
elif origin is None and type(hint).__name__ == "_TypeAliasBase": # Python 3.6
9797
return TypeAliasTypeHint(hint, source)
98-
elif origin is None and getattr(hint, "_name") == "TypeAlias": # Python <3.10
98+
elif origin is None and getattr(hint, "_name", None) == "TypeAlias": # Python <3.10
9999
return TypeAliasTypeHint(hint, source)
100100
elif origin is None and getattr(hint, "__name__", None) == "TypeAlias": # Python >=3.10
101101
return TypeAliasTypeHint(hint, source)

0 commit comments

Comments
 (0)