Skip to content

Commit 32a33c3

Browse files
Don't serialize annotated types (#881)
Signed-off-by: Sebastian Wagner <[email protected]> Co-authored-by: Sebastian Wagner <[email protected]>
1 parent 10e0694 commit 32a33c3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mypy_django_plugin/transformers/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ def get_or_create_annotated_type(
533533
type_name,
534534
bases=[model_type] if fields_dict is not None else [model_type, annotated_model_type],
535535
fields=fields_dict.items if fields_dict is not None else None,
536+
no_serialize=True,
536537
)
537538
if fields_dict is not None:
538539
# To allow structural subtyping, make it a Protocol

0 commit comments

Comments
 (0)