from _typeshed import Incomplete, SupportsNext, SupportsRichComparison
from collections.abc import Generator, Iterable, Iterator, Mapping, MutableMapping
from typing import Any, Literal, TypeVar, overload

_T = TypeVar("_T")

class URIDict(MutableMapping[str, MutableMapping[str, Any]]):
    def normalize(self, uri: str) -> str: ...
    store: dict[str, MutableMapping[str, Any]]
    def __init__(
        self,
        m: Mapping[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: ...

class Unset: ...

def format_as_index(container: str, indices: Iterable[Incomplete] | None) -> str: ...
def find_additional_properties(instance: Iterable[str], schema: Mapping[str, Iterable[str]]) -> Generator[str]: ...
def extras_msg(extras: Iterable[object]) -> tuple[str, Literal["was", "were"]]: ...  # elements are passed to the repr() function

@overload
def ensure_list(thing: str) -> list[str]: ...
@overload
def ensure_list(thing: _T) -> _T: ...

def equal(one, two) -> bool: ...
def unbool(element, true=..., false=...): ...
def uniq(container: Iterable[SupportsRichComparison]) -> bool: ...
def find_evaluated_item_indexes_by_schema(validator, instance, schema) -> list[Incomplete]: ...
def find_evaluated_property_keys_by_schema(validator, instance, schema) -> list[Incomplete]: ...
def is_valid(errs_it: SupportsNext[object]) -> bool: ...
