Skip to content

Commit a67f194

Browse files
committed
fix(typing): fix type annotations to match fix in marshmallow 3.24.0
Ref: marshmallow-code/marshmallow@560eed7
1 parent aae60c6 commit a67f194

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

marshmallow_dataclass/union_field.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import copy
22
from typing import List, Tuple, Any, Optional
3+
from typing import Union as typing_Union
34

45
import typeguard
56
from typeguard import TypeCheckError
@@ -29,7 +30,9 @@ def __init__(self, union_fields: List[Tuple[type, fields.Field]], **kwargs):
2930
super().__init__(**kwargs)
3031
self.union_fields = union_fields
3132

32-
def _bind_to_schema(self, field_name: str, schema: Schema) -> None:
33+
def _bind_to_schema(
34+
self, field_name: str, schema: typing_Union[Schema, fields.Field]
35+
) -> None:
3336
super()._bind_to_schema(field_name, schema)
3437
new_union_fields = []
3538
for typ, field in self.union_fields:

0 commit comments

Comments
 (0)