Files
typeshed/stdlib/2/shelve.pyi
Jelle Zijlstra 83ca997140 Change more defaults to ... (#1729)
* codemod ': Any = None' ': Any = ...'
* codemod ': (Union|Optional)([^=]+)\s+=\s+-?\d+' ': \1\2 = ...'
* codemod ': (Union|Optional)([^=]+)\s*=\s*-?(None|False|True)' ': \1\2 = ...'
* codemod ': (int|float|bool)\s*=\s*-?\d+' ': \1 = ...'
* codemod ': (bool)\s*=\s*(False|True)' ': \1 = ...'
* codemod ': Any\s*=\s*(False|True|None)' ': Any = ...'
2017-11-13 06:56:24 -08:00

34 lines
1.5 KiB
Python

from typing import Any, Dict, Iterator, List, Optional, Tuple
import collections
class Shelf(collections.MutableMapping):
def __init__(self, dict: Dict[Any, Any], protocol: Optional[int] = ..., writeback: bool = ..., keyencoding: str = ...) -> None: ...
def __iter__(self) -> Iterator[str]: ...
def keys(self) -> List[Any]: ...
def __len__(self) -> int: ...
def has_key(self, key: Any) -> bool: ...
def __contains__(self, key: Any) -> bool: ...
def get(self, key: Any, default: Any = ...) -> Any: ...
def __getitem__(self, key: Any) -> Any: ...
def __setitem__(self, key: Any, value: Any) -> None: ...
def __delitem__(self, key: Any) -> 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[Any, 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: ...