From 8bbacabdcd37be4cef405758086c54f461900d94 Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:36:13 +0100 Subject: [PATCH] Fix type hints of `converters` in `urls.resolvers` --- django-stubs/urls/resolvers.pyi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/django-stubs/urls/resolvers.pyi b/django-stubs/urls/resolvers.pyi index f7ca6db39..a267d36e2 100644 --- a/django-stubs/urls/resolvers.pyi +++ b/django-stubs/urls/resolvers.pyi @@ -5,7 +5,6 @@ from typing import Any, overload from django.core.checks.messages import CheckMessage from django.urls import _AnyURL -from django.urls.converters import UUIDConverter from django.utils.datastructures import MultiValueDict from django.utils.functional import cached_property from typing_extensions import TypeAlias @@ -59,7 +58,7 @@ class CheckURLMixin: class RegexPattern(CheckURLMixin): regex: LocaleRegexDescriptor name: str | None - converters: dict[Any, Any] + converters: dict[str, Any] def __init__(self, regex: str, name: str | None = ..., is_endpoint: bool = ...) -> None: ... def match(self, path: str) -> tuple[str, tuple, dict[str, str]] | None: ... def check(self) -> list[CheckMessage]: ... @@ -67,14 +66,14 @@ class RegexPattern(CheckURLMixin): class RoutePattern(CheckURLMixin): regex: LocaleRegexDescriptor name: str | None - converters: dict[str, UUIDConverter] + converters: dict[str, Any] def __init__(self, route: str, name: str | None = ..., is_endpoint: bool = ...) -> None: ... def match(self, path: str) -> tuple[str, tuple, dict[str, int | str]] | None: ... def check(self) -> list[CheckMessage]: ... class LocalePrefixPattern: prefix_default_language: bool - converters: dict[Any, Any] + converters: dict[str, Any] def __init__(self, prefix_default_language: bool = ...) -> None: ... @property def regex(self) -> Pattern[str]: ...