Skip to content

Commit 718cb5f

Browse files
committed
fix: happy with 3.14
1 parent a2205b2 commit 718cb5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/funix/decorator/magic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def get_type_dict(annotation: any) -> dict:
181181
return {"type": getattr(annotation, "__name__")}
182182
elif annotation_type_class_name == "range":
183183
return {"type": "range"}
184-
elif annotation_type_class_name in ["UnionType", "_UnionGenericAlias"]:
184+
elif annotation_type_class_name in ["Union", "UnionType", "_UnionGenericAlias"]:
185185
if (
186186
len(getattr(annotation, "__args__")) != 2
187187
or getattr(annotation, "__args__")[0].__name__ == "NoneType"

0 commit comments

Comments
 (0)