massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / dbm / dumb.pyi
diff --git a/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stdlib/dbm/dumb.pyi b/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stdlib/dbm/dumb.pyi
new file mode 100644 (file)
index 0000000..0a941b0
--- /dev/null
@@ -0,0 +1,26 @@
+from _typeshed import Self
+from types import TracebackType
+from typing import Iterator, MutableMapping, Type, Union
+
+_KeyType = Union[str, bytes]
+_ValueType = Union[str, bytes]
+
+error = OSError
+
+class _Database(MutableMapping[_KeyType, bytes]):
+    def __init__(self, filebasename: str, mode: str, flag: str = ...) -> None: ...
+    def sync(self) -> None: ...
+    def iterkeys(self) -> Iterator[bytes]: ...  # undocumented
+    def close(self) -> None: ...
+    def __getitem__(self, key: _KeyType) -> bytes: ...
+    def __setitem__(self, key: _KeyType, value: _ValueType) -> None: ...
+    def __delitem__(self, key: _KeyType) -> None: ...
+    def __iter__(self) -> Iterator[bytes]: ...
+    def __len__(self) -> int: ...
+    def __del__(self) -> None: ...
+    def __enter__(self: Self) -> Self: ...
+    def __exit__(
+        self, exc_type: Type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
+    ) -> None: ...
+
+def open(file: str, flag: str = ..., mode: int = ...) -> _Database: ...