Debian Codegraph @

test-data/unit/lib-stub/collections.pyi

raw
1 from typing import Any, Iterable, Union, Dict, TypeVar, Optional, Callable, Generic, Sequence, MutableMapping
2
3 def namedtuple(
4 typename: str,
5 field_names: Union[str, Iterable[str]],
6 *,
7 # really bool but many tests don't have bool available
8 rename: int = ...,
9 module: Optional[str] = ...,
10 defaults: Optional[Iterable[Any]] = ...
11 ) -> Any: ...
12
13 KT = TypeVar('KT')
14 VT = TypeVar('VT')
15
16 class OrderedDict(Dict[KT, VT]): ...
17
18 class defaultdict(Dict[KT, VT]):
19 def __init__(self, default_factory: Optional[Callable[[], VT]]) -> None: ...
20
21 class Counter(Dict[KT, int], Generic[KT]): ...
22
23 class deque(Sequence[KT], Generic[KT]): ...
24
25 class ChainMap(MutableMapping[KT, VT], Generic[KT, VT]): ...