Skip to content

Commit 8e9484d

Browse files
authored
Fix type hints of converters in urls.resolvers (#1892)
1 parent 560bdab commit 8e9484d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

django-stubs/urls/resolvers.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ from typing import Any, overload
55

66
from django.core.checks.messages import CheckMessage
77
from django.urls import _AnyURL
8-
from django.urls.converters import UUIDConverter
98
from django.utils.datastructures import MultiValueDict
109
from django.utils.functional import cached_property
1110
from typing_extensions import TypeAlias
@@ -59,22 +58,22 @@ class CheckURLMixin:
5958
class RegexPattern(CheckURLMixin):
6059
regex: LocaleRegexDescriptor
6160
name: str | None
62-
converters: dict[Any, Any]
61+
converters: dict[str, Any]
6362
def __init__(self, regex: str, name: str | None = ..., is_endpoint: bool = ...) -> None: ...
6463
def match(self, path: str) -> tuple[str, tuple, dict[str, str]] | None: ...
6564
def check(self) -> list[CheckMessage]: ...
6665

6766
class RoutePattern(CheckURLMixin):
6867
regex: LocaleRegexDescriptor
6968
name: str | None
70-
converters: dict[str, UUIDConverter]
69+
converters: dict[str, Any]
7170
def __init__(self, route: str, name: str | None = ..., is_endpoint: bool = ...) -> None: ...
7271
def match(self, path: str) -> tuple[str, tuple, dict[str, int | str]] | None: ...
7372
def check(self) -> list[CheckMessage]: ...
7473

7574
class LocalePrefixPattern:
7675
prefix_default_language: bool
77-
converters: dict[Any, Any]
76+
converters: dict[str, Any]
7877
def __init__(self, prefix_default_language: bool = ...) -> None: ...
7978
@property
8079
def regex(self) -> Pattern[str]: ...

0 commit comments

Comments
 (0)