Re-organize directory structure (#4971)

See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
Ivan Levkivskyi
2021-01-27 12:00:39 +00:00
committed by GitHub
parent 869238e587
commit 16ae4c6120
1399 changed files with 601 additions and 97 deletions

34
stdlib/shelve.pyi Normal file
View File

@@ -0,0 +1,34 @@
import collections
from typing import Any, Dict, Iterator, Optional, Tuple
class Shelf(collections.MutableMapping[Any, Any]):
def __init__(
self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...
) -> None: ...
def __iter__(self) -> Iterator[str]: ...
def __len__(self) -> int: ...
def __contains__(self, key: Any) -> bool: ... # key should be str, but it would conflict with superclass's type signature
def get(self, key: str, default: Any = ...) -> Any: ...
def __getitem__(self, key: str) -> Any: ...
def __setitem__(self, key: str, value: Any) -> None: ...
def __delitem__(self, key: str) -> None: ...
def __enter__(self) -> Shelf: ...
def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
def close(self) -> None: ...
def __del__(self) -> None: ...
def sync(self) -> None: ...
class BsdDbShelf(Shelf):
def __init__(
self, dict: Dict[bytes, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...
) -> None: ...
def set_location(self, key: Any) -> Tuple[str, Any]: ...
def next(self) -> Tuple[str, Any]: ...
def previous(self) -> Tuple[str, Any]: ...
def first(self) -> Tuple[str, Any]: ...
def last(self) -> Tuple[str, Any]: ...
class DbfilenameShelf(Shelf):
def __init__(self, filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> None: ...
def open(filename: str, flag: str = ..., protocol: Optional[int] = ..., writeback: bool = ...) -> DbfilenameShelf: ...