Skip to content

Commit

Permalink
feat: Add missing stubs
Browse files Browse the repository at this point in the history
Add stubs for django.contrib.auth.decorators::login_not_required
Add stubs for django.contrib.auth.forms::_unicode_ci_compare
  • Loading branch information
BradleyKirton committed Aug 21, 2024
1 parent 807090a commit 4b42d61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions django-stubs/contrib/auth/decorators.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def user_passes_test(
def login_required(redirect_field_name: str | None = ..., login_url: str | None = ...) -> Callable[[_VIEW], _VIEW]: ...
@overload
def login_required(function: _VIEW, redirect_field_name: str | None = ..., login_url: str | None = ...) -> _VIEW: ...
def login_not_required(view_func: _VIEW) -> _VIEW: ...
def permission_required(
perm: Iterable[str] | str, login_url: str | None = ..., raise_exception: bool = ...
) -> Callable[[_VIEW], _VIEW]: ...
2 changes: 2 additions & 0 deletions django-stubs/contrib/auth/forms.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ from typing_extensions import TypeAlias
UserModel: TypeAlias = type[_UserModel]
_User = TypeVar("_User", bound=AbstractBaseUser)

def _unicode_ci_compare(s1: str, s2: str) -> bool: ...

class ReadOnlyPasswordHashWidget(forms.Widget):
template_name: str
read_only: bool
Expand Down

0 comments on commit 4b42d61

Please sign in to comment.