Skip to content

Commit 9ef08a6

Browse files
authored
fix typing for URL validator.__call__ (typeddjango#2074)
while it will only be successful for `str`, the first step of the validator is to check the type. this matches the RegexValidator above
1 parent 2c1a749 commit 9ef08a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django-stubs/core/validators.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class URLValidator(RegexValidator):
4242
unsafe_chars: frozenset[str]
4343
max_length: int
4444
def __init__(self, schemes: Sequence[str] | None = ..., **kwargs: Any) -> None: ...
45-
def __call__(self, value: str) -> None: ...
45+
def __call__(self, value: Any) -> None: ...
4646

4747
integer_validator: RegexValidator
4848

0 commit comments

Comments
 (0)