From 171a5809aa20116fc0856e02b68194302f9159e3 Mon Sep 17 00:00:00 2001 From: SaJH Date: Mon, 15 Apr 2024 21:49:37 +0900 Subject: [PATCH] [3.15] Add is_already_registered function of BaseRouter --- rest_framework-stubs/routers.pyi | 1 + scripts/stubtest/allowlist_todo.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework-stubs/routers.pyi b/rest_framework-stubs/routers.pyi index 41c2bbb72..1301b6763 100644 --- a/rest_framework-stubs/routers.pyi +++ b/rest_framework-stubs/routers.pyi @@ -35,6 +35,7 @@ class BaseRouter(metaclass=RenameRouterMethods): def register( self, prefix: str, viewset: type[ViewSetMixin], basename: str | None = ..., base_name: str | None = ... ) -> None: ... + def is_already_registered(self, new_basename: str) -> bool: ... def get_default_basename(self, viewset: type[ViewSetMixin]) -> str: ... def get_urls(self) -> list[_AnyURL]: ... @property diff --git a/scripts/stubtest/allowlist_todo.txt b/scripts/stubtest/allowlist_todo.txt index 5ce812434..dc065201a 100644 --- a/scripts/stubtest/allowlist_todo.txt +++ b/scripts/stubtest/allowlist_todo.txt @@ -142,7 +142,6 @@ rest_framework.filters.search_smart_split rest_framework.generics.GenericAPIView.__class_getitem__ rest_framework.request.Request.__class_getitem__ rest_framework.response.Response.__class_getitem__ -rest_framework.routers.BaseRouter.is_already_registered rest_framework.serializers.Field.__class_getitem__ rest_framework.serializers.ListSerializer.run_child_validation rest_framework.serializers.ModelSerializer.get_unique_together_constraints