Skip to content

Commit d6241fc

Browse files
authored
fix(uri): remove "mailto:" prefix manually (#418)
* the use of `lstrip()` here was a bit too aggressive * `removeprefix()` is only available with python 3.9+
1 parent 25fcef0 commit d6241fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validators/uri.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def uri(value: str, /):
6868

6969
# email
7070
if value.startswith("mailto:"):
71-
return email(value.lstrip("mailto:"))
71+
return email(value[len("mailto:"):])
7272

7373
# file
7474
if value.startswith("file:"):

0 commit comments

Comments
 (0)