File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6868
6969 - uses : actions/setup-python@v5
7070 with :
71- python-version : ' 3.8 '
71+ python-version : ' 3.10 '
7272
7373 - uses : actions/checkout@v4
7474 with :
Original file line number Diff line number Diff line change @@ -331,7 +331,12 @@ def build_schema(Type) -> Schema:
331331
332332 if not (is_dataclass (Type ) or is_namedtuple (Type )):
333333 raise TypeNotSupported (type_ = Type )
334- hints = get_type_hints (Type )
334+ try :
335+ hints = get_type_hints (Type )
336+ except TypeError as te :
337+ # this can happen for instance on 3.9 if pipe syntax was used for Union types
338+ # would be nice to provide a friendlier error though
339+ raise TypeNotSupported (type_ = Type ) from te
335340 fields = tuple ((k , build_schema (t )) for k , t in hints .items ())
336341 return SDataclass (
337342 type = Type ,
You can’t perform that action at this time.
0 commit comments