|
1 |
| -from typing import Any, List, Optional, Set, Tuple, Type, Union |
| 1 | +from typing import Any, Collection, Optional, Set, Tuple, Type, Union |
2 | 2 |
|
3 | 3 | from django.contrib.auth.base_user import AbstractBaseUser as AbstractBaseUser, BaseUserManager as BaseUserManager
|
4 | 4 | from django.contrib.contenttypes.models import ContentType
|
@@ -41,8 +41,8 @@ class PermissionsMixin(models.Model):
|
41 | 41 | user_permissions: models.ManyToManyField = models.ManyToManyField(Permission)
|
42 | 42 | def get_group_permissions(self, obj: None = ...) -> Set[str]: ...
|
43 | 43 | def get_all_permissions(self, obj: Optional[str] = ...) -> Set[str]: ...
|
44 |
| - def has_perm(self, perm: Union[Tuple[str, Any], str], obj: Optional[str] = ...) -> bool: ... |
45 |
| - def has_perms(self, perm_list: Union[List[str], Set[str], Tuple[str]], obj: None = ...) -> bool: ... |
| 44 | + def has_perm(self, perm: str, obj: Optional[str] = ...) -> bool: ... |
| 45 | + def has_perms(self, perm_list: Collection[str], obj: None = ...) -> bool: ... |
46 | 46 | def has_module_perms(self, app_label: str) -> bool: ...
|
47 | 47 |
|
48 | 48 | class AbstractUser(AbstractBaseUser, PermissionsMixin): # type: ignore
|
@@ -80,7 +80,7 @@ class AnonymousUser:
|
80 | 80 | def get_group_permissions(self, obj: None = ...) -> Set[Any]: ...
|
81 | 81 | def get_all_permissions(self, obj: Any = ...) -> Set[str]: ...
|
82 | 82 | def has_perm(self, perm: str, obj: None = ...) -> bool: ...
|
83 |
| - def has_perms(self, perm_list: Union[List[str], Tuple[str]], obj: None = ...) -> bool: ... |
| 83 | + def has_perms(self, perm_list: Collection[str], obj: None = ...) -> bool: ... |
84 | 84 | def has_module_perms(self, module: str) -> bool: ...
|
85 | 85 | @property
|
86 | 86 | def is_anonymous(self) -> bool: ...
|
|
0 commit comments