From 448d491e94b8791e7cee2d3e80f45226486202b5 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 26 Jun 2024 21:57:26 +0200 Subject: [PATCH] Type schema attribute as Any --- voluptuous/schema_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voluptuous/schema_builder.py b/voluptuous/schema_builder.py index 2bf6954..7d519e9 100644 --- a/voluptuous/schema_builder.py +++ b/voluptuous/schema_builder.py @@ -208,7 +208,7 @@ def __init__( - Any value other than the above defaults to :const:`~voluptuous.PREVENT_EXTRA` """ - self.schema = schema + self.schema: typing.Any = schema self.required = required self.extra = int(extra) # ensure the value is an integer self._compiled = self._compile(schema) @@ -1034,7 +1034,7 @@ def __init__( msg: typing.Optional[str] = None, description: typing.Optional[str] = None, ) -> None: - self.schema = schema_ + self.schema: typing.Any = schema_ self._schema = Schema(schema_) self.msg = msg self.description = description