From 166da73b6f7e46cee1b245eb27c3e5d759f6255c Mon Sep 17 00:00:00 2001 From: Jae Hyuck Sa Date: Tue, 16 Apr 2024 17:57:44 +0900 Subject: [PATCH] [3.15] Add optional_logout csrt_token argument (#589) --- rest_framework-stubs/templatetags/rest_framework.pyi | 2 +- scripts/stubtest/allowlist_todo.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework-stubs/templatetags/rest_framework.pyi b/rest_framework-stubs/templatetags/rest_framework.pyi index bbc379dad..9f4a080b0 100644 --- a/rest_framework-stubs/templatetags/rest_framework.pyi +++ b/rest_framework-stubs/templatetags/rest_framework.pyi @@ -26,7 +26,7 @@ def render_form(serializer: Any, template_pack: Any | None = ...) -> Incomplete: def render_field(field: Any, style: Any) -> Incomplete: ... def optional_login(request: Request) -> Incomplete: ... def optional_docs_login(request: Request) -> Incomplete: ... -def optional_logout(request: Request, user: AnonymousUser | AbstractBaseUser) -> Incomplete: ... +def optional_logout(request: Request, user: AnonymousUser | AbstractBaseUser, csrf_token: str) -> Incomplete: ... def add_query_param(request: Request, key: str, val: Any) -> Incomplete: ... def as_string(value: Any) -> str: ... def as_list_of_strings(value: Any) -> list[str]: ... diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 5d2d452d2..ab4e7a40a 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -140,5 +140,4 @@ rest_framework.views.GenericView rest_framework.filters.search_smart_split rest_framework.serializers.ListSerializer.run_child_validation rest_framework.serializers.ModelSerializer.get_unique_together_constraints -rest_framework.templatetags.rest_framework.optional_logout rest_framework.utils.field_mapping.get_unique_validators