diff --git a/django-stubs/core/validators.pyi b/django-stubs/core/validators.pyi index 093867f..8dc870e 100644 --- a/django-stubs/core/validators.pyi +++ b/django-stubs/core/validators.pyi @@ -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 @@ -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 @@ -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: ... @@ -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: ...