Skip to content

Commit

Permalink
Update resolvers.pyi
Browse files Browse the repository at this point in the history
Resolver.resolve_error_handler should return a callable that takes in a request and returns a response, with no addition arguments.
  • Loading branch information
ljodal authored Oct 4, 2024
1 parent 35886a4 commit 187bc4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django-stubs/urls/resolvers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from types import ModuleType
from typing import Any, overload

from django.core.checks.messages import CheckMessage
from django.http import HttpRequest, HttpResponse
from django.urls import _AnyURL
from django.utils.datastructures import MultiValueDict
from django.utils.functional import cached_property
Expand Down Expand Up @@ -128,7 +129,7 @@ class URLResolver:
@cached_property
def url_patterns(self) -> list[_AnyURL]: ...
def resolve(self, path: str) -> ResolverMatch: ...
def resolve_error_handler(self, view_type: int) -> Callable: ...
def resolve_error_handler(self, view_type: int) -> Callable[[HttpRequest], HttpResponse]: ...
def reverse(self, lookup_view: str, *args: Any, **kwargs: Any) -> str: ...
def _is_callback(self, name: str) -> bool: ...
def _populate(self) -> None: ...
Expand Down

0 comments on commit 187bc4b

Please sign in to comment.