Skip to content

Commit

Permalink
Add type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Nov 24, 2024
1 parent 8c6d098 commit 776959a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mashumaro/jsonschema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ class JSONSchemaInstanceFormatExtension(JSONSchemaInstanceFormat):
}


def _deserialize_json_schema_instance_format(value):
def _deserialize_json_schema_instance_format(
value: Any,
) -> JSONSchemaInstanceFormat:
for cls in iter_all_subclasses(JSONSchemaInstanceFormat):
try:
return cls(value)
Expand Down Expand Up @@ -167,7 +169,7 @@ class Config(BaseConfig):
Null: pass_through,
JSONSchemaInstanceFormat: {
"deserialize": _deserialize_json_schema_instance_format,
}
},
}

def __pre_serialize__(self) -> Self:
Expand Down

0 comments on commit 776959a

Please sign in to comment.