diff --git a/django-stubs/contrib/auth/decorators.pyi b/django-stubs/contrib/auth/decorators.pyi index 7fcbe5257..a17f5bd45 100644 --- a/django-stubs/contrib/auth/decorators.pyi +++ b/django-stubs/contrib/auth/decorators.pyi @@ -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]: ... diff --git a/scripts/stubtest/allowlist_todo_django51.txt b/scripts/stubtest/allowlist_todo_django51.txt index 84fa424ae..b64905951 100644 --- a/scripts/stubtest/allowlist_todo_django51.txt +++ b/scripts/stubtest/allowlist_todo_django51.txt @@ -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