diff --git a/stubs/urllib3/urllib3/util/url.pyi b/stubs/urllib3/urllib3/util/url.pyi index b658bb36c237..91a36abb9c1b 100644 --- a/stubs/urllib3/urllib3/util/url.pyi +++ b/stubs/urllib3/urllib3/util/url.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import NamedTuple from .. import exceptions @@ -6,8 +6,16 @@ LocationParseError = exceptions.LocationParseError url_attrs: list[str] -class Url: - slots: Any +class _UrlBase(NamedTuple): + auth: str | None + fragment: str | None + host: str | None + path: str | None + port: str | None + query: str | None + scheme: str | None + +class Url(_UrlBase): def __new__( cls, scheme: str | None = ..., @@ -27,6 +35,6 @@ class Url: @property def url(self) -> str: ... -def split_first(s, delims): ... +def split_first(s: str, delims: str) -> tuple[str, str, str | None]: ... def parse_url(url: str) -> Url: ... -def get_host(url): ... +def get_host(url: str) -> tuple[str, str | None, str | None]: ...