Skip to content

Commit

Permalink
Update voluptuous/validators.py
Browse files Browse the repository at this point in the history
Co-authored-by: Antoni Szych <antoni.szych@rtbhouse.com>
  • Loading branch information
alecthomas and antoni-szych-rtbhouse authored Dec 12, 2023
1 parent 0023550 commit 16e79cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion voluptuous/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Coerce(object):
... validate('foo')
"""

def __init__(self, type: type | typing.Callable, msg: typing.Optional[str] = None) -> None:
def __init__(self, type: typing.Union[type, typing.Callable], msg: typing.Optional[str] = None) -> None:
self.type = type
self.msg = msg
self.type_name = type.__name__
Expand Down

0 comments on commit 16e79cb

Please sign in to comment.