mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 14:01:56 +08:00
Don't serialize annotated types (#881)
Signed-off-by: Sebastian Wagner <sebastian@inter.link> Co-authored-by: Sebastian Wagner <sebastian@inter.link>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user