diff --git a/stubs/jsonschema/jsonschema/_utils.pyi b/stubs/jsonschema/jsonschema/_utils.pyi index 0ddd9c689191..2f609252c2ea 100644 --- a/stubs/jsonschema/jsonschema/_utils.pyi +++ b/stubs/jsonschema/jsonschema/_utils.pyi @@ -1,15 +1,20 @@ from _typeshed import Incomplete, SupportsKeysAndGetItem, SupportsNext, SupportsRichComparison from collections.abc import Generator, Iterable, Iterator, Mapping, MutableMapping -from typing import Literal, TypeVar, overload +from typing import Any, Literal, TypeVar, overload _T = TypeVar("_T") -class URIDict(MutableMapping[str, str]): +class URIDict(MutableMapping[str, MutableMapping[str, Any]]): def normalize(self, uri: str) -> str: ... - store: dict[str, str] - def __init__(self, m: SupportsKeysAndGetItem[str, str] | Iterable[tuple[str, str]], /, **kwargs: str) -> None: ... - def __getitem__(self, uri: str) -> str: ... - def __setitem__(self, uri: str, value: str) -> None: ... + store: dict[str, MutableMapping[str, Any]] + def __init__( + self, + m: SupportsKeysAndGetItem[str, MutableMapping[str, Any]] | Iterable[tuple[str, MutableMapping[str, Any]]], + /, + **kwargs: MutableMapping[str, Any], + ) -> None: ... + def __getitem__(self, uri: str) -> MutableMapping[str, Any]: ... + def __setitem__(self, uri: str, value: MutableMapping[str, Any]) -> None: ... def __delitem__(self, uri: str) -> None: ... def __iter__(self) -> Iterator[str]: ... def __len__(self) -> int: ... diff --git a/stubs/jsonschema/jsonschema/validators.pyi b/stubs/jsonschema/jsonschema/validators.pyi index 4e93434f1d65..483c870fc786 100644 --- a/stubs/jsonschema/jsonschema/validators.pyi +++ b/stubs/jsonschema/jsonschema/validators.pyi @@ -105,7 +105,7 @@ class RefResolver: self, base_uri: str, referrer: dict[str, Incomplete], - store: SupportsKeysAndGetItem[str, str] | Iterable[tuple[str, str]] = ..., + store: Mapping[str, Mapping[str, Any]] | Iterable[tuple[str, Mapping[str, Any]]] = ..., cache_remote: bool = True, handlers: SupportsKeysAndGetItem[str, _Handler] | Iterable[tuple[str, _Handler]] = (), urljoin_cache=None,