From 14435a69cc86825522dc79a870101efcd13a578e Mon Sep 17 00:00:00 2001 From: Maxim Kurnikov Date: Fri, 21 Dec 2018 05:01:08 +0300 Subject: [PATCH] move django.urls completely --- django-stubs-generated/core/mail/__init__.pyi | 3 +- django-stubs-generated/urls/__init__.pyi | 36 ----- django-stubs-generated/urls/base.pyi | 28 ---- django-stubs-generated/urls/conf.pyi | 13 -- django-stubs-generated/urls/converters.pyi | 30 ---- django-stubs-generated/urls/exceptions.pyi | 7 - django-stubs-generated/urls/resolvers.pyi | 141 ------------------ django-stubs-generated/urls/utils.pyi | 4 - django-stubs/conf/urls/__init__.pyi | 21 ++- django-stubs/core/mail/__init__.pyi | 3 +- django-stubs/urls/__init__.pyi | 34 ++++- django-stubs/urls/base.pyi | 7 +- django-stubs/urls/conf.pyi | 2 +- django-stubs/urls/converters.pyi | 21 ++- django-stubs/urls/resolvers.pyi | 14 +- 15 files changed, 65 insertions(+), 299 deletions(-) delete mode 100644 django-stubs-generated/urls/__init__.pyi delete mode 100644 django-stubs-generated/urls/base.pyi delete mode 100644 django-stubs-generated/urls/conf.pyi delete mode 100644 django-stubs-generated/urls/converters.pyi delete mode 100644 django-stubs-generated/urls/exceptions.pyi delete mode 100644 django-stubs-generated/urls/resolvers.pyi delete mode 100644 django-stubs-generated/urls/utils.pyi diff --git a/django-stubs-generated/core/mail/__init__.pyi b/django-stubs-generated/core/mail/__init__.pyi index 31b3330..42e3589 100644 --- a/django-stubs-generated/core/mail/__init__.pyi +++ b/django-stubs-generated/core/mail/__init__.pyi @@ -8,7 +8,6 @@ from django.core.mail.message import EmailMultiAlternatives as EmailMultiAlterna from django.core.mail.message import SafeMIMEMultipart as SafeMIMEMultipart from django.core.mail.message import SafeMIMEText as SafeMIMEText from django.core.mail.message import forbid_multi_line_headers as forbid_multi_line_headers -from django.core.mail.message import make_msgid as make_msgid from django.core.mail.utils import DNS_NAME as DNS_NAME from django.core.mail.utils import CachedDnsName as CachedDnsName @@ -45,3 +44,5 @@ def mail_managers( connection: Optional[BaseEmailBackend] = ..., html_message: Optional[str] = ..., ) -> None: ... + +outbox = [EmailMessage()] diff --git a/django-stubs-generated/urls/__init__.pyi b/django-stubs-generated/urls/__init__.pyi deleted file mode 100644 index 3742aa4..0000000 --- a/django-stubs-generated/urls/__init__.pyi +++ /dev/null @@ -1,36 +0,0 @@ -# noinspection PyUnresolvedReferences -from .base import ( - clear_script_prefix as clear_script_prefix, - clear_url_caches as clear_url_caches, - get_script_prefix as get_script_prefix, - get_urlconf as get_urlconf, - is_valid_path as is_valid_path, - resolve as resolve, - reverse as reverse, - reverse_lazy as reverse_lazy, - set_script_prefix as set_script_prefix, - set_urlconf as set_urlconf, - translate_url as translate_url, -) - -# noinspection PyUnresolvedReferences -from .conf import include as include, path as path, re_path as re_path - -# noinspection PyUnresolvedReferences -from .converters import register_converter as register_converter - -# noinspection PyUnresolvedReferences -from .exceptions import NoReverseMatch as NoReverseMatch, Resolver404 as Resolver404 - -# noinspection PyUnresolvedReferences -from .resolvers import ( - LocalePrefixPattern as LocalePrefixPattern, - ResolverMatch as ResolverMatch, - URLPattern as URLPattern, - URLResolver as URLResolver, - get_ns_resolver as get_ns_resolver, - get_resolver as get_resolver, -) - -# noinspection PyUnresolvedReferences -from .utils import get_callable as get_callable, get_mod_func as get_mod_func diff --git a/django-stubs-generated/urls/base.pyi b/django-stubs-generated/urls/base.pyi deleted file mode 100644 index 1d29c3a..0000000 --- a/django-stubs-generated/urls/base.pyi +++ /dev/null @@ -1,28 +0,0 @@ -from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union -from uuid import UUID - -from django.urls.resolvers import ResolverMatch - -from .exceptions import NoReverseMatch, Resolver404 -from .resolvers import get_ns_resolver, get_resolver -from .utils import get_callable - -def resolve(path: str, urlconf: Optional[str] = ...) -> ResolverMatch: ... -def reverse( - viewname: Optional[Union[Callable, str]], - urlconf: Optional[str] = ..., - args: Optional[Union[List[UUID], Tuple]] = ..., - kwargs: Optional[Union[Dict[str, None], Dict[str, bytes], Dict[str, str], Dict[str, UUID]]] = ..., - current_app: Optional[str] = ..., -) -> str: ... - -reverse_lazy: Any - -def clear_url_caches() -> None: ... -def set_script_prefix(prefix: str) -> None: ... -def get_script_prefix() -> str: ... -def clear_script_prefix() -> None: ... -def set_urlconf(urlconf_name: Optional[Union[Type[Any], str]]) -> None: ... -def get_urlconf(default: None = ...) -> Optional[Union[Type[Any], str]]: ... -def is_valid_path(path: str, urlconf: Optional[str] = ...) -> bool: ... -def translate_url(url: str, lang_code: str) -> str: ... diff --git a/django-stubs-generated/urls/conf.pyi b/django-stubs-generated/urls/conf.pyi deleted file mode 100644 index 1ea4db0..0000000 --- a/django-stubs-generated/urls/conf.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any, Callable, List, Optional, Tuple, Union - -from django.urls.resolvers import URLPattern, URLResolver - -from .resolvers import LocalePrefixPattern, RegexPattern, RoutePattern, URLPattern, URLResolver - -def include( - arg: Union[List[Tuple[str, Callable]], List[URLPattern], List[URLResolver], Tuple[List[URLResolver], str], str], - namespace: Optional[str] = ..., -) -> Union[Tuple[List[Any], str, str], Tuple[List[URLResolver], None, None]]: ... - -path: Any -re_path: Any diff --git a/django-stubs-generated/urls/converters.pyi b/django-stubs-generated/urls/converters.pyi deleted file mode 100644 index ffc6e8a..0000000 --- a/django-stubs-generated/urls/converters.pyi +++ /dev/null @@ -1,30 +0,0 @@ -from typing import Any, Dict, Optional, Type, Union -from uuid import UUID - -class IntConverter: - regex: str = ... - def to_python(self, value: str) -> int: ... - def to_url(self, value: Union[int, str]) -> str: ... - -class StringConverter: - regex: str = ... - def to_python(self, value: str) -> str: ... - def to_url(self, value: Union[int, str, UUID]) -> Union[int, str, UUID]: ... - -class UUIDConverter: - regex: str = ... - def to_python(self, value: str) -> UUID: ... - def to_url(self, value: Union[str, UUID]) -> str: ... - -class SlugConverter(StringConverter): - regex: str = ... - -class PathConverter(StringConverter): - regex: str = ... - -DEFAULT_CONVERTERS: Any -REGISTERED_CONVERTERS: Any - -def register_converter(converter: Type[Any], type_name: str) -> None: ... -def get_converters() -> Dict[str, Union[IntConverter, StringConverter, UUIDConverter]]: ... -def get_converter(raw_converter: str) -> Union[IntConverter, StringConverter, UUIDConverter]: ... diff --git a/django-stubs-generated/urls/exceptions.pyi b/django-stubs-generated/urls/exceptions.pyi deleted file mode 100644 index 7856f54..0000000 --- a/django-stubs-generated/urls/exceptions.pyi +++ /dev/null @@ -1,7 +0,0 @@ -from django.http import Http404 - -class Resolver404(Http404): - pass - -class NoReverseMatch(Exception): - pass diff --git a/django-stubs-generated/urls/resolvers.pyi b/django-stubs-generated/urls/resolvers.pyi deleted file mode 100644 index 79ba927..0000000 --- a/django-stubs-generated/urls/resolvers.pyi +++ /dev/null @@ -1,141 +0,0 @@ -from collections import OrderedDict -from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union - -from django.contrib.flatpages.sitemaps import FlatPageSitemap -from django.contrib.sitemaps import Sitemap -from django.core.checks.messages import CheckMessage, Warning -from django.urls.converters import UUIDConverter -from django.utils.datastructures import MultiValueDict - -class ResolverMatch: - func: Callable = ... - args: Tuple = ... - kwargs: Dict[str, Any] = ... - url_name: Optional[str] = ... - app_names: List[str] = ... - app_name: str = ... - namespaces: List[str] = ... - namespace: str = ... - view_name: str = ... - def __init__( - self, - func: Callable, - args: Tuple, - kwargs: Dict[str, Any], - url_name: Optional[str] = ..., - app_names: Optional[List[Optional[str]]] = ..., - namespaces: Optional[List[Optional[str]]] = ..., - ) -> None: ... - def __getitem__(self, index: int) -> Any: ... - -def get_resolver(urlconf: Optional[Union[Type[Any], str]] = ...) -> URLResolver: ... -def get_ns_resolver(ns_pattern: str, resolver: URLResolver, converters: Tuple) -> URLResolver: ... - -class LocaleRegexDescriptor: - attr: str = ... - def __init__(self, attr: Any) -> None: ... - def __get__(self, instance: Optional[RegexPattern], cls: Type[RegexPattern] = ...) -> LocaleRegexDescriptor: ... - -class CheckURLMixin: - def describe(self) -> str: ... - -class RegexPattern(CheckURLMixin): - regex: Any = ... - name: Optional[str] = ... - converters: Dict[Any, Any] = ... - def __init__(self, regex: str, name: Optional[str] = ..., is_endpoint: bool = ...) -> None: ... - def match(self, path: str) -> Optional[Tuple[str, Tuple, Dict[str, str]]]: ... - def check(self) -> List[Warning]: ... - -class RoutePattern(CheckURLMixin): - regex: Any = ... - name: Optional[str] = ... - converters: Dict[str, UUIDConverter] = ... - def __init__(self, route: str, name: Optional[str] = ..., is_endpoint: bool = ...) -> None: ... - def match(self, path: str) -> Optional[Tuple[str, Tuple, Dict[str, Union[int, str]]]]: ... - def check(self) -> List[Warning]: ... - -class LocalePrefixPattern: - prefix_default_language: bool = ... - converters: Dict[Any, Any] = ... - def __init__(self, prefix_default_language: bool = ...) -> None: ... - @property - def regex(self): ... - @property - def language_prefix(self) -> str: ... - def match(self, path: str) -> Optional[Tuple[str, Tuple, Dict[Any, Any]]]: ... - def check(self) -> List[Any]: ... - def describe(self) -> str: ... - -class URLPattern: - lookup_str: str - pattern: django.urls.resolvers.CheckURLMixin = ... - callback: Callable = ... - default_args: Dict[ - str, - Union[ - Dict[str, Type[django.contrib.flatpages.sitemaps.FlatPageSitemap]], - Dict[str, django.contrib.sitemaps.Sitemap], - collections.OrderedDict, - str, - ], - ] = ... - name: Optional[str] = ... - def __init__( - self, - pattern: CheckURLMixin, - callback: Callable, - default_args: Optional[ - Union[ - Dict[str, Dict[str, Type[FlatPageSitemap]]], - Dict[str, Dict[str, Sitemap]], - Dict[str, OrderedDict], - Dict[str, str], - ] - ] = ..., - name: Optional[str] = ..., - ) -> None: ... - def check(self) -> List[Warning]: ... - def resolve(self, path: str) -> Optional[ResolverMatch]: ... - def lookup_str(self) -> str: ... - -class URLResolver: - url_patterns: List[Tuple[str, Callable]] - urlconf_module: Optional[Union[List[Tuple[str, Callable]], Type[Any]]] - pattern: Union[django.urls.resolvers.CheckURLMixin, django.urls.resolvers.LocalePrefixPattern] = ... - urlconf_name: Optional[ - Union[ - List[List[Any]], - List[Tuple[str, Callable]], - List[django.urls.resolvers.URLPattern], - List[django.urls.resolvers.URLResolver], - Type[Any], - str, - ] - ] = ... - callback: None = ... - default_kwargs: Dict[str, Union[Dict[Any, Any], str]] = ... - namespace: Optional[str] = ... - app_name: Optional[str] = ... - def __init__( - self, - pattern: Union[CheckURLMixin, LocalePrefixPattern], - urlconf_name: Optional[ - Union[List[List[Any]], List[Tuple[str, Callable]], List[URLPattern], List[URLResolver], Type[Any], str] - ], - default_kwargs: Optional[Union[Dict[str, Dict[Any, Any]], Dict[str, str]]] = ..., - app_name: Optional[str] = ..., - namespace: Optional[str] = ..., - ) -> None: ... - def check(self) -> List[CheckMessage]: ... - @property - def reverse_dict(self) -> MultiValueDict: ... - @property - def namespace_dict(self) -> Dict[str, Tuple[str, URLResolver]]: ... - @property - def app_dict(self) -> Dict[str, List[str]]: ... - def resolve(self, path: str) -> ResolverMatch: ... - def urlconf_module(self) -> Optional[Union[List[Tuple[str, Callable]], Type[Any]]]: ... - def url_patterns(self) -> List[Tuple[str, Callable]]: ... - def resolve_error_handler(self, view_type: int) -> Tuple[Callable, Dict[Any, Any]]: ... - def reverse(self, lookup_view: str, *args: Any, **kwargs: Any) -> str: ... diff --git a/django-stubs-generated/urls/utils.pyi b/django-stubs-generated/urls/utils.pyi deleted file mode 100644 index 22928bd..0000000 --- a/django-stubs-generated/urls/utils.pyi +++ /dev/null @@ -1,4 +0,0 @@ -from typing import Any, Callable, Optional, Tuple, Union - -def get_callable(lookup_view: Union[Callable, str]) -> Callable: ... -def get_mod_func(callback: str) -> Tuple[str, str]: ... diff --git a/django-stubs/conf/urls/__init__.pyi b/django-stubs/conf/urls/__init__.pyi index 585575d..fb0ceba 100644 --- a/django-stubs/conf/urls/__init__.pyi +++ b/django-stubs/conf/urls/__init__.pyi @@ -1,26 +1,25 @@ # Stubs for django.conf.urls (Python 3.5) - +from types import ModuleType from typing import Any, Callable, Dict, List, Optional, overload, Tuple, Union from django.http.response import HttpResponse -from django.urls import RegexURLPattern, RegexURLResolver -from django.urls.resolvers import URLConf +from django.urls import URLResolver, URLPattern handler400 = ... # type: str handler403 = ... # type: str handler404 = ... # type: str handler500 = ... # type: str -def include(arg: Any, namespace: str = None, app_name: str = None) -> Tuple[URLConf, Optional[str], Optional[str]]: ... +URLConf = Union[str, ModuleType] + +def include(arg: Any, namespace: str = ..., app_name: str = ...) -> Tuple[URLConf, Optional[str], Optional[str]]: ... @overload def url( - regex: str, view: Callable[..., HttpResponse], kwargs: Dict[str, Any] = None, name: str = None -) -> RegexURLPattern: ... # type: ignore # issue 253 of typing + regex: str, view: Callable[..., HttpResponse], kwargs: Dict[str, Any] = ..., name: str = ... +) -> URLPattern: ... # type: ignore # issue 253 of typing @overload def url( - regex: str, view: Tuple[URLConf, Optional[str], Optional[str]], kwargs: Dict[str, Any] = None, name: str = None -) -> RegexURLResolver: ... + regex: str, view: Tuple[URLConf, Optional[str], Optional[str]], kwargs: Dict[str, Any] = ..., name: str = ... +) -> URLResolver: ... @overload -def url( - regex: str, view: List[Union[URLConf, str]], kwargs: Dict[str, Any] = None, name: str = None -) -> RegexURLResolver: ... +def url(regex: str, view: List[Union[URLConf, str]], kwargs: Dict[str, Any] = ..., name: str = ...) -> URLResolver: ... diff --git a/django-stubs/core/mail/__init__.pyi b/django-stubs/core/mail/__init__.pyi index 31b3330..42e3589 100644 --- a/django-stubs/core/mail/__init__.pyi +++ b/django-stubs/core/mail/__init__.pyi @@ -8,7 +8,6 @@ from django.core.mail.message import EmailMultiAlternatives as EmailMultiAlterna from django.core.mail.message import SafeMIMEMultipart as SafeMIMEMultipart from django.core.mail.message import SafeMIMEText as SafeMIMEText from django.core.mail.message import forbid_multi_line_headers as forbid_multi_line_headers -from django.core.mail.message import make_msgid as make_msgid from django.core.mail.utils import DNS_NAME as DNS_NAME from django.core.mail.utils import CachedDnsName as CachedDnsName @@ -45,3 +44,5 @@ def mail_managers( connection: Optional[BaseEmailBackend] = ..., html_message: Optional[str] = ..., ) -> None: ... + +outbox = [EmailMessage()] diff --git a/django-stubs/urls/__init__.pyi b/django-stubs/urls/__init__.pyi index d952b50..3742aa4 100644 --- a/django-stubs/urls/__init__.pyi +++ b/django-stubs/urls/__init__.pyi @@ -1,8 +1,36 @@ -from .base import reverse as reverse +# noinspection PyUnresolvedReferences +from .base import ( + clear_script_prefix as clear_script_prefix, + clear_url_caches as clear_url_caches, + get_script_prefix as get_script_prefix, + get_urlconf as get_urlconf, + is_valid_path as is_valid_path, + resolve as resolve, + reverse as reverse, + reverse_lazy as reverse_lazy, + set_script_prefix as set_script_prefix, + set_urlconf as set_urlconf, + translate_url as translate_url, +) +# noinspection PyUnresolvedReferences from .conf import include as include, path as path, re_path as re_path -from .resolvers import ResolverMatch as ResolverMatch, get_ns_resolver as get_ns_resolver, get_resolver as get_resolver - # noinspection PyUnresolvedReferences from .converters import register_converter as register_converter + +# noinspection PyUnresolvedReferences +from .exceptions import NoReverseMatch as NoReverseMatch, Resolver404 as Resolver404 + +# noinspection PyUnresolvedReferences +from .resolvers import ( + LocalePrefixPattern as LocalePrefixPattern, + ResolverMatch as ResolverMatch, + URLPattern as URLPattern, + URLResolver as URLResolver, + get_ns_resolver as get_ns_resolver, + get_resolver as get_resolver, +) + +# noinspection PyUnresolvedReferences +from .utils import get_callable as get_callable, get_mod_func as get_mod_func diff --git a/django-stubs/urls/base.pyi b/django-stubs/urls/base.pyi index b09e8f8..d0e233d 100644 --- a/django-stubs/urls/base.pyi +++ b/django-stubs/urls/base.pyi @@ -1,5 +1,4 @@ -from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union -from uuid import UUID +from typing import Any, Callable, Dict, Optional, Type, Union, Sequence from django.urls.resolvers import ResolverMatch @@ -7,8 +6,8 @@ def resolve(path: str, urlconf: Optional[str] = ...) -> ResolverMatch: ... def reverse( viewname: Optional[Union[Callable, str]], urlconf: Optional[str] = ..., - args: Optional[Union[List[UUID], Tuple]] = ..., - kwargs: Optional[Union[Dict[str, None], Dict[str, bytes], Dict[str, str], Dict[str, UUID]]] = ..., + args: Optional[Sequence[Any]] = ..., + kwargs: Optional[Dict[str, Any]] = ..., current_app: Optional[str] = ..., ) -> str: ... diff --git a/django-stubs/urls/conf.pyi b/django-stubs/urls/conf.pyi index 8ee8586..aaaab5d 100644 --- a/django-stubs/urls/conf.pyi +++ b/django-stubs/urls/conf.pyi @@ -5,7 +5,7 @@ from .resolvers import URLPattern, URLResolver def include( arg: Union[List[Tuple[str, Callable]], List[URLPattern], List[URLResolver], Tuple[List[URLResolver], str], str], namespace: Optional[str] = ..., -) -> Union[Tuple[List[Any], str, str], Tuple[List[URLResolver], None, None]]: ... +) -> Tuple[List[URLResolver], Optional[str], Optional[str]]: ... path: Any re_path: Any diff --git a/django-stubs/urls/converters.pyi b/django-stubs/urls/converters.pyi index e2bb50a..cf09f0b 100644 --- a/django-stubs/urls/converters.pyi +++ b/django-stubs/urls/converters.pyi @@ -1,30 +1,27 @@ -from typing import Any, Dict, Type, Union +from typing import Any, Dict, Type, Union, Protocol from uuid import UUID class IntConverter: regex: str = ... def to_python(self, value: str) -> int: ... - def to_url(self, value: Union[int, str]) -> str: ... + def to_url(self, value: Union[str, int]) -> str: ... class StringConverter: regex: str = ... def to_python(self, value: str) -> str: ... - def to_url(self, value: Union[int, str, UUID]) -> Union[int, str, UUID]: ... + def to_url(self, value: str) -> str: ... class UUIDConverter: regex: str = ... def to_python(self, value: str) -> UUID: ... def to_url(self, value: Union[str, UUID]) -> str: ... -class SlugConverter(StringConverter): - regex: str = ... +class SlugConverter(StringConverter): ... +class PathConverter(StringConverter): ... -class PathConverter(StringConverter): - regex: str = ... - -DEFAULT_CONVERTERS: Any -REGISTERED_CONVERTERS: Any +DEFAULT_CONVERTERS: Dict[str, Any] +REGISTERED_CONVERTERS: Dict[str, Any] def register_converter(converter: Type[Any], type_name: str) -> None: ... -def get_converters() -> Dict[str, Union[IntConverter, StringConverter, UUIDConverter]]: ... -def get_converter(raw_converter: str) -> Union[IntConverter, StringConverter, UUIDConverter]: ... +def get_converters() -> Dict[str, Any]: ... +def get_converter(raw_converter: str) -> Any: ... diff --git a/django-stubs/urls/resolvers.pyi b/django-stubs/urls/resolvers.pyi index 6b917d2..bac8789 100644 --- a/django-stubs/urls/resolvers.pyi +++ b/django-stubs/urls/resolvers.pyi @@ -24,7 +24,7 @@ class ResolverMatch: ) -> None: ... def __getitem__(self, index: int) -> Any: ... -def get_resolver(urlconf: Optional[Union[Type[Any], str]] = ...) -> URLResolver: ... +def get_resolver(urlconf: Optional[str] = ...) -> URLResolver: ... def get_ns_resolver(ns_pattern: str, resolver: URLResolver, converters: Tuple) -> URLResolver: ... class LocaleRegexDescriptor: @@ -59,7 +59,7 @@ class LocalePrefixPattern: def regex(self): ... @property def language_prefix(self) -> str: ... - def match(self, path: str) -> Optional[Tuple[str, Tuple, Dict[Any, Any]]]: ... + def match(self, path: str) -> Optional[Tuple[str, Tuple, Dict[str, Any]]]: ... def check(self) -> List[Any]: ... def describe(self) -> str: ... @@ -77,18 +77,18 @@ class URLPattern: class URLResolver: url_patterns: List[Tuple[str, Callable]] - urlconf_module: Optional[Union[List[Tuple[str, Callable]], Type[Any]]] + urlconf_module: Optional[List[Tuple[str, Callable]]] pattern: Any = ... urlconf_name: Optional[str] = ... callback: None = ... - default_kwargs: Dict[str, Union[Dict[Any, Any], str]] = ... + default_kwargs: Dict[str, Any] = ... namespace: Optional[str] = ... app_name: Optional[str] = ... def __init__( self, pattern: Any, urlconf_name: Optional[str], - default_kwargs: Optional[Union[Dict[str, Dict[Any, Any]], Dict[str, str]]] = ..., + default_kwargs: Optional[Dict[str, Any]] = ..., app_name: Optional[str] = ..., namespace: Optional[str] = ..., ) -> None: ... @@ -99,7 +99,7 @@ class URLResolver: @property def app_dict(self) -> Dict[str, List[str]]: ... def resolve(self, path: str) -> ResolverMatch: ... - def urlconf_module(self) -> Optional[Union[List[Tuple[str, Callable]], Type[Any]]]: ... + def urlconf_module(self) -> Optional[List[Tuple[str, Callable]]]: ... def url_patterns(self) -> List[Tuple[str, Callable]]: ... - def resolve_error_handler(self, view_type: int) -> Tuple[Callable, Dict[Any, Any]]: ... + def resolve_error_handler(self, view_type: int) -> Tuple[Callable, Dict[str, Any]]: ... def reverse(self, lookup_view: str, *args: Any, **kwargs: Any) -> str: ...