massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3 / shelve.pyi
1 from typing import Any, Dict, Iterator, Optional, Tuple\r
2 import collections\r
3 \r
4 \r
5 class Shelf(collections.MutableMapping):\r
6     def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ...\r
7     def __iter__(self) -> Iterator[str]: ...\r
8     def __len__(self) -> int: ...\r
9     def __contains__(self, key: Any) -> bool: ...  # key should be str, but it would conflict with superclass's type signature\r
10     def get(self, key: str, default: Any = ...) -> Any: ...\r
11     def __getitem__(self, key: str) -> Any: ...\r
12     def __setitem__(self, key: str, value: Any) -> None: ...\r
13     def __delitem__(self, key: str) -> None: ...\r
14     def __enter__(self) -> Shelf: ...\r
15     def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...\r
16     def close(self) -> None: ...\r
17     def __del__(self) -> None: ...\r
18     def sync(self) -> None: ...\r
19 \r
20 class BsdDbShelf(Shelf):\r
21     def __init__(self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ...\r
22     def set_location(self, key: Any) -> Tuple[str, Any]: ...\r
23     def next(self) -> Tuple[str, Any]: ...\r
24     def previous(self) -> Tuple[str, Any]: ...\r
25     def first(self) -> Tuple[str, Any]: ...\r
26     def last(self) -> Tuple[str, Any]: ...\r
27 \r
28 class DbfilenameShelf(Shelf):\r
29     def __init__(self, filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> None: ...\r
30 \r
31 def open(filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> DbfilenameShelf: ...\r