Skip to content

Commit

Permalink
Merge pull request #208 from Fatal1ty/fix-annotated-on-python313
Browse files Browse the repository at this point in the history
Fix type substitution in Annotated on Python 3.13
  • Loading branch information
Fatal1ty committed Apr 14, 2024
2 parents 311a76a + 884ca15 commit 7626d35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mashumaro/core/meta/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,9 @@ def substitute_type_params(typ: Type, substitutions: Dict[Type, Type]) -> Type:
if is_annotated(typ):
origin = get_type_origin(typ)
subst = substitutions.get(origin, origin)
return typing_extensions.Annotated.__class_getitem__( # type: ignore
(subst, *get_type_annotations(typ))
)
return typing_extensions.Annotated[
(subst, *get_type_annotations(typ)) # type: ignore
]
else:
new_type_args = []
for type_param in collect_type_params(typ):
Expand Down

0 comments on commit 7626d35

Please sign in to comment.