Skip to content

Commit

Permalink
Relax type annotation for type_schemas (#185)
Browse files Browse the repository at this point in the history
The type_schemas member is used as a mapping of either a schema
class or schema instance. Relax the type annotation of that member to be
either.

Resolves #184
  • Loading branch information
bester committed Feb 13, 2024
1 parent b76ee1c commit 24eb651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/marshmallow_oneofschema/one_of_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_obj_type(self, obj):

type_field = "type"
type_field_remove = True
type_schemas: typing.Dict[str, typing.Type[Schema]] = {}
type_schemas: typing.Mapping[str, typing.Union[typing.Type[Schema], Schema]] = {}

def get_obj_type(self, obj):
"""Returns name of the schema during dump() calls, given the object
Expand Down

0 comments on commit 24eb651

Please sign in to comment.