Skip to content

Commit 8789cec

Browse files
committed
fixed unions
1 parent 14cdc61 commit 8789cec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scanpydoc/elegant_typehints/return_tuple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def get_tuple_annot(annotation: Optional[Type]) -> Optional[Tuple[Type, ...]]:
1919
return None
2020
if origin is Union:
2121
for annotation in annotation.__args__:
22-
origin = getattr(annotation, "__origin__")
22+
origin = getattr(annotation, "__origin__", None)
2323
if origin in (tuple, Tuple):
2424
break
2525
else:

0 commit comments

Comments
 (0)