massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / frozendict / frozendict.pyi
1 import collections
2 from typing import Any, Generic, Iterable, Iterator, Mapping, Type, TypeVar, overload
3
4 _S = TypeVar("_S")
5 _KT = TypeVar("_KT")
6 _VT = TypeVar("_VT")
7
8 class frozendict(Mapping[_KT, _VT], Generic[_KT, _VT]):
9
10     dict_cls: Type[dict[Any, Any]] = ...
11     @overload
12     def __init__(self, **kwargs: _VT) -> None: ...
13     @overload
14     def __init__(self, mapping: Mapping[_KT, _VT]) -> None: ...
15     @overload
16     def __init__(self, iterable: Iterable[tuple[_KT, _VT]]) -> None: ...
17     def __getitem__(self, key: _KT) -> _VT: ...
18     def __contains__(self, key: object) -> bool: ...
19     def copy(self: _S, **add_or_replace: _VT) -> _S: ...
20     def __iter__(self) -> Iterator[_KT]: ...
21     def __len__(self) -> int: ...
22     def __repr__(self) -> str: ...
23     def __hash__(self) -> int: ...
24
25 class FrozenOrderedDict(frozendict[_KT, _VT]):
26
27     dict_cls: Type[collections.OrderedDict[Any, Any]] = ...