mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 04:54:48 +08:00
Allow returning bool from test_func (#220)
This commit is contained in:
committed by
Maksim Kurnikov
parent
287c64d6fb
commit
14aea2b4d4
@@ -1,4 +1,4 @@
|
|||||||
from typing import Any, Callable, List
|
from typing import Any, Callable, List, Optional
|
||||||
|
|
||||||
from django import http
|
from django import http
|
||||||
from django.http.response import HttpResponse, HttpResponseRedirect
|
from django.http.response import HttpResponse, HttpResponseRedirect
|
||||||
@@ -23,6 +23,6 @@ class PermissionRequiredMixin(AccessMixin):
|
|||||||
def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
||||||
|
|
||||||
class UserPassesTestMixin(AccessMixin):
|
class UserPassesTestMixin(AccessMixin):
|
||||||
def test_func(self) -> None: ...
|
def test_func(self) -> Optional[bool]: ...
|
||||||
def get_test_func(self) -> Callable: ...
|
def get_test_func(self) -> Callable: ...
|
||||||
def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
def dispatch(self, request: http.HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user