-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvdict.pyi
31 lines (29 loc) · 1.6 KB
/
vdict.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from typing import Any, Dict, ItemsView, Iterable, Generic, KeysView, List, Sequence, Tuple, TypeVar, Union, ValuesView
VDFKey = Union[str, Tuple[int, str]]
_TKey = TypeVar('_TKey', str, Tuple[int, str])
_TValue = TypeVar('_TValue')
class VDFDict(dict, Generic[_TKey, _TValue]):
def __init__(self, data: Union[Dict[_TKey, _TValue], List[Tuple[_TKey, _TValue]], None] = ...) -> None: ...
def __len__(self) -> int: ...
def __setitem__(self, key : _TKey, value: _TValue) -> None: ...
def __getitem__(self, key: _TKey) -> _TValue: ...
def __delitem__(self, key: _TKey) -> _TValue: ...
def __iter__(self) -> Iterable[_TKey]: ...
def __contains__(self, key: _TKey) -> bool: ...
def __eq__(self, other: Any) -> bool: ...
def __ne__(self, other: Any) -> bool: ...
def clear(self) -> None: ...
def get(self, key: _TKey, fallback_value: _TValue = ...) -> _TValue: ...
def setdefault(self, key: _TKey, default: _TValue = ...) -> _TValue: ...
def pop(self, key: _TKey) -> _TValue: ...
def popitem(self) -> _TValue: ...
def update(self, data: Union[Dict[_TKey, _TValue], List[Tuple[_TKey, _TValue]], None] = ...) -> None: ...
def iterkeys(self) -> Sequence[str]: ...
def keys(self) -> KeysView[_TKey]: ...
def itervalues(self) -> Sequence[_TValue]: ...
def values(self) -> ValuesView[_TValue]: ...
def iteritems(self) -> Sequence[Tuple[str, _TValue]]: ...
def items(self) -> ItemsView[_TKey, _TValue]: ...
def get_all_for(self, key: _TKey) -> List[_TValue]: ...
def remove_all_for(self, key: _TKey) -> None: ...
def has_duplicates(self) -> bool: ...