From c090b8fd9170ef19e08722183aed6c46a0f8b292 Mon Sep 17 00:00:00 2001 From: Rohit Rahman Date: Tue, 15 Jul 2025 15:43:24 +0530 Subject: [PATCH] Fix return type of options method in APIView to Response --- rest_framework-stubs/views.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework-stubs/views.pyi b/rest_framework-stubs/views.pyi index 5c9d8e50e..617aea7ac 100644 --- a/rest_framework-stubs/views.pyi +++ b/rest_framework-stubs/views.pyi @@ -89,4 +89,4 @@ class APIView(View): def handle_exception(self, exc: Exception) -> Response: ... def raise_uncaught_exception(self, exc: Exception) -> NoReturn: ... def dispatch(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponseBase: ... - def options(self, request: Request, *args: Any, **kwargs: Any) -> HttpResponseBase: ... # type: ignore[override] + def options(self, request: Request, *args: Any, **kwargs: Any) -> Response: ... # type: ignore[override]