Skip to content

Commit 11b45df

Browse files
catch if __name__ is not set
1 parent 55b02fe commit 11b45df

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
@@ -92,7 +92,7 @@ def _make_wrapper(cls, hint: object, source: "Any | None") -> "TypeHint":
9292
return TypeVarTypeHint(hint, source)
9393
elif origin == tuple:
9494
return TupleTypeHint(hint, source)
95-
elif origin is None and getattr(hint, "__name__") == "TypeAlias":
95+
elif origin is None and getattr(hint, "__name__", None) == "TypeAlias":
9696
return TypeAliasTypeHint(hint, source)
9797
elif origin is ClassVar or hint is ClassVar:
9898
return ClassVarTypeHint(hint, source)

0 commit comments

Comments
 (0)