Use dbm._TFlags in shelve.open (#7084)

This commit is contained in:
Nikita Sobolev
2022-01-30 16:05:52 +03:00
committed by GitHub
parent 3b29006a3e
commit 1a71371dda

View File

@@ -1,5 +1,6 @@
from _typeshed import Self
from collections.abc import Iterator, MutableMapping
from dbm import _TFlags
from types import TracebackType
from typing import TypeVar, overload
@@ -34,6 +35,6 @@ class BsdDbShelf(Shelf[_VT]):
def last(self) -> tuple[str, _VT]: ...
class DbfilenameShelf(Shelf[_VT]):
def __init__(self, filename: str, flag: str = ..., protocol: int | None = ..., writeback: bool = ...) -> None: ...
def __init__(self, filename: str, flag: _TFlags = ..., protocol: int | None = ..., writeback: bool = ...) -> None: ...
def open(filename: str, flag: str = ..., protocol: int | None = ..., writeback: bool = ...) -> Shelf[object]: ...
def open(filename: str, flag: _TFlags = ..., protocol: int | None = ..., writeback: bool = ...) -> Shelf[object]: ...