Skip to content

Commit

Permalink
Don't serialize annotated types (#881)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Wagner <sebastian@inter.link>

Co-authored-by: Sebastian Wagner <sebastian@inter.link>
  • Loading branch information
sebastian-philipp and sebastian-philipp committed Mar 22, 2022
1 parent 10e0694 commit 32a33c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mypy_django_plugin/transformers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ def get_or_create_annotated_type(
type_name,
bases=[model_type] if fields_dict is not None else [model_type, annotated_model_type],
fields=fields_dict.items if fields_dict is not None else None,
no_serialize=True,
)
if fields_dict is not None:
# To allow structural subtyping, make it a Protocol
Expand Down

0 comments on commit 32a33c3

Please sign in to comment.