Various packages stubtest fixes (#5221)

This commit is contained in:
hatal175
2021-04-16 07:04:40 +03:00
committed by GitHub
parent 3d8bffae80
commit 82be016aa4
5 changed files with 20 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
from types import TracebackType
from typing import Iterator, MutableMapping, Optional, Type, Union
from typing import Iterator, MutableMapping, Optional, Tuple, Type, Union
from typing_extensions import Literal
_KeyType = Union[str, bytes]
@@ -18,7 +18,9 @@ class _Database(MutableMapping[_KeyType, bytes]):
self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]
) -> None: ...
class error(Exception): ...
class _error(Exception): ...
error = Tuple[Type[_error], Type[OSError]]
def whichdb(filename: str) -> str: ...
def open(file: str, flag: Literal["r", "w", "c", "n"] = ..., mode: int = ...) -> _Database: ...