Skip to content

Commit

Permalink
Merge pull request #2018 from kkirsche/patch-1
Browse files Browse the repository at this point in the history
Add return type to `fields.Email.__init__` so that it's not untyped
  • Loading branch information
lafrech authored Aug 22, 2022
2 parents cf45177 + 15e2dd7 commit 9a50159
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/marshmallow/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit 9a50159

Please sign in to comment.