From 15e2dd7880a64500a3403ed5c199cd200d791c5b Mon Sep 17 00:00:00 2001 From: Kevin Kirsche Date: Mon, 25 Jul 2022 13:07:40 -0400 Subject: [PATCH] Add return type to `fields.Email.__init__` so that it's not untyped --- src/marshmallow/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index 383b34ef6..05831d676 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -1731,7 +1731,7 @@ class Email(String): #: Default error messages. default_error_messages = {"invalid": "Not a valid email address."} - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) # Insert validation into self.validators so that multiple errors can be stored. validator = validate.Email(error=self.error_messages["invalid"])