Skip to content

Commit 740fa49

Browse files
committed
🐛 fix mypy type issue
1 parent fc66fc9 commit 740fa49

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,6 +1,7 @@
11
import copy
22
import inspect
33
from typing import List, Tuple, Any, Optional
4+
import typing
45

56
import typeguard
67
from marshmallow import fields, Schema, ValidationError
@@ -43,7 +44,9 @@ def __init__(self, union_fields: List[Tuple[type, fields.Field]], **kwargs):
4344
super().__init__(**kwargs)
4445
self.union_fields = union_fields
4546

46-
def _bind_to_schema(self, field_name: str, schema: Schema) -> None:
47+
def _bind_to_schema(
48+
self, field_name: str, schema: typing.Union[Schema, fields.Field]
49+
) -> None:
4750
super()._bind_to_schema(field_name, schema)
4851
new_union_fields = []
4952
for typ, field in self.union_fields:

0 commit comments

Comments
 (0)