From 776959a8bc3cce7d149149d08c64e3d180c66536 Mon Sep 17 00:00:00 2001 From: Alexander Tikhonov Date: Sun, 24 Nov 2024 19:11:56 +0300 Subject: [PATCH] Add type annotations --- mashumaro/jsonschema/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mashumaro/jsonschema/models.py b/mashumaro/jsonschema/models.py index 973ba20..c68e08a 100644 --- a/mashumaro/jsonschema/models.py +++ b/mashumaro/jsonschema/models.py @@ -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) @@ -167,7 +169,7 @@ class Config(BaseConfig): Null: pass_through, JSONSchemaInstanceFormat: { "deserialize": _deserialize_json_schema_instance_format, - } + }, } def __pre_serialize__(self) -> Self: