Skip to content

Commit 2ad9b1b

Browse files
committed
Mark the arguments of the public methods as keyword-only except the email argument to validate_email
The email argument should be positional-only, but we're still building with Python 3.6-7 which don't support that yet.
1 parent 35d9a18 commit 2ad9b1b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: email_validator/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def __get_length_reason(addr, utf8=False, limit=EMAIL_MAX_LENGTH):
251251
return reason.format(prefix, diff, suffix)
252252

253253

254-
def caching_resolver(timeout=None, cache=None):
254+
def caching_resolver(*, timeout=None, cache=None):
255255
if timeout is None:
256256
timeout = DEFAULT_TIMEOUT
257257
resolver = dns.resolver.Resolver()
@@ -262,6 +262,8 @@ def caching_resolver(timeout=None, cache=None):
262262

263263
def validate_email(
264264
email,
265+
# /, # not supported in Python 3.6, 3.7
266+
*,
265267
allow_smtputf8=None,
266268
allow_empty_local=False,
267269
check_deliverability=None,

0 commit comments

Comments
 (0)