Skip to content

Commit

Permalink
feat: Add missing stubs (#2348)
Browse files Browse the repository at this point in the history
* feat: Add missing stubs

Add stubs for django.contrib.auth.decorators::login_not_required

* Update allowlist_todo_django51.txt

---------

Co-authored-by: sobolevn <[email protected]>
  • Loading branch information
BradleyKirton and sobolevn authored Aug 22, 2024
1 parent ead941f commit 2dfa15b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
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]: ...
1 change: 0 additions & 1 deletion scripts/stubtest/allowlist_todo_django51.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ django.contrib.admin.models.LogEntryManager.log_actions
django.contrib.admin.options.ModelAdmin.log_deletions
django.contrib.auth.base_user.BaseUserManager.make_random_password
django.contrib.auth.checks.check_middleware
django.contrib.auth.decorators.login_not_required
django.contrib.auth.forms.AdminPasswordChangeForm.clean_password2
django.contrib.auth.forms.AdminPasswordChangeForm.usable_password_help_text
django.contrib.auth.forms.BaseUserCreationForm.clean_password2
Expand Down

0 comments on commit 2dfa15b

Please sign in to comment.