diff --git a/django-stubs/contrib/auth/models.pyi b/django-stubs/contrib/auth/models.pyi index a8a91d9..b7c0f09 100644 --- a/django-stubs/contrib/auth/models.pyi +++ b/django-stubs/contrib/auth/models.pyi @@ -1,4 +1,4 @@ -from typing import Any, List, Optional, Set, Tuple, Type, Union +from typing import Any, Collection, Optional, Set, Tuple, Type, Union from django.contrib.auth.base_user import AbstractBaseUser as AbstractBaseUser, BaseUserManager as BaseUserManager from django.contrib.contenttypes.models import ContentType @@ -42,7 +42,7 @@ class PermissionsMixin(models.Model): def get_group_permissions(self, obj: None = ...) -> Set[str]: ... def get_all_permissions(self, obj: Optional[str] = ...) -> Set[str]: ... def has_perm(self, perm: str, obj: Optional[str] = ...) -> bool: ... - def has_perms(self, perm_list: Union[List[str], Set[str], Tuple[str]], obj: None = ...) -> bool: ... + def has_perms(self, perm_list: Collection[str], obj: None = ...) -> bool: ... def has_module_perms(self, app_label: str) -> bool: ... class AbstractUser(AbstractBaseUser, PermissionsMixin): # type: ignore @@ -80,7 +80,7 @@ class AnonymousUser: def get_group_permissions(self, obj: None = ...) -> Set[Any]: ... def get_all_permissions(self, obj: Any = ...) -> Set[str]: ... def has_perm(self, perm: str, obj: None = ...) -> bool: ... - def has_perms(self, perm_list: Union[List[str], Tuple[str]], obj: None = ...) -> bool: ... + def has_perms(self, perm_list: Collection[str], obj: None = ...) -> bool: ... def has_module_perms(self, module: str) -> bool: ... @property def is_anonymous(self) -> bool: ...