Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions django-stubs/core/validators.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime
from decimal import Decimal
from re import RegexFlag
from typing import Any, Dict, List, Optional, Union, Pattern
from typing import Any, Dict, List, Optional, Union, Pattern, Collection
from uuid import UUID

from django.core.files.base import File
Expand Down Expand Up @@ -38,7 +38,7 @@ class URLValidator(RegexValidator):
tld_re: Any = ...
host_re: Any = ...
schemes: Any = ...
def __init__(self, schemes: Optional[List[str]] = ..., **kwargs: Any) -> None: ...
def __init__(self, schemes: Optional[Collection[str]] = ..., **kwargs: Any) -> None: ...

integer_validator: Any

Expand All @@ -52,7 +52,7 @@ class EmailValidator:
literal_regex: Any = ...
domain_whitelist: Any = ...
def __init__(
self, message: Optional[str] = ..., code: Optional[str] = ..., whitelist: Optional[List[str]] = ...
self, message: Optional[str] = ..., code: Optional[str] = ..., whitelist: Optional[Collection[str]] = ...
) -> None: ...
def __call__(self, value: Optional[str]) -> None: ...
def validate_domain_part(self, domain_part: str) -> bool: ...
Expand Down Expand Up @@ -119,7 +119,10 @@ class FileExtensionValidator:
code: str = ...
allowed_extensions: List[str] = ...
def __init__(
self, allowed_extensions: Optional[List[str]] = ..., message: Optional[str] = ..., code: Optional[str] = ...
self,
allowed_extensions: Optional[Collection[str]] = ...,
message: Optional[str] = ...,
code: Optional[str] = ...,
) -> None: ...
def __call__(self, value: File) -> None: ...

Expand Down