From 66df7bef3790af39b330832f0dc3d0be742c8171 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 26 Jun 2024 01:15:04 +0200 Subject: [PATCH] Remove Maybe validator typing (#517) * Remove Maybe validator typing * Use Schemable as validator type --- voluptuous/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voluptuous/validators.py b/voluptuous/validators.py index cd00278..d385260 100644 --- a/voluptuous/validators.py +++ b/voluptuous/validators.py @@ -599,7 +599,7 @@ def PathExists(v): raise PathInvalid("Not a Path") -def Maybe(validator: typing.Callable, msg: typing.Optional[str] = None): +def Maybe(validator: Schemable, msg: typing.Optional[str] = None): """Validate that the object matches given validator or is None. :raises Invalid: If the value does not match the given validator and is not