Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
commonism committed Nov 13, 2023
1 parent 337e3b2 commit dc0747a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pydantic/networks.py
Expand Up @@ -164,12 +164,12 @@ def import_email_validator() -> None:
import email_validator
except ImportError as e:
raise ImportError('email-validator is not installed, run `pip install pydantic[email]`') from e
if hasattr(email_validator, "__version__") and email_validator.__version__.partition(".")[0] == "2":
if hasattr(email_validator, '__version__') and email_validator.__version__.partition('.')[0] == '2':
return
else:
input_email = b"testaddr@example.tld"
valid_email = validate_email(input_email, check_deliverability=False)
if not hasattr(valid_email, "normalized"):
input_email = 'testaddr@example.tld'
valid_email = validate_email(input_email)
if not hasattr(valid_email, 'normalized'):
raise ImportError('email-validator version >= 2.0 required')


Expand Down

0 comments on commit dc0747a

Please sign in to comment.