From 16163aaeab0f99317438582aa10c26783605df5a Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Thu, 27 Jun 2024 00:05:36 +0200 Subject: [PATCH] Type schema attribute as Any (#521) --- 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 56935c4..237d5a9 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.Any | None = None, ) -> None: - self.schema = schema_ + self.schema: typing.Any = schema_ self._schema = Schema(schema_) self.msg = msg self.description = description