massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / atomicwrites / atomicwrites / __init__.pyi
diff --git a/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stubs/atomicwrites/atomicwrites/__init__.pyi b/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/typeshed-fallback/stubs/atomicwrites/atomicwrites/__init__.pyi
new file mode 100644 (file)
index 0000000..388ac27
--- /dev/null
@@ -0,0 +1,16 @@
+from _typeshed import StrOrBytesPath
+from typing import IO, Any, AnyStr, Callable, ContextManager, Text, Type
+
+def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
+def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
+
+class AtomicWriter(object):
+    def __init__(self, path: StrOrBytesPath, mode: Text = ..., overwrite: bool = ...) -> None: ...
+    def open(self) -> ContextManager[IO[Any]]: ...
+    def _open(self, get_fileobject: Callable[..., IO[AnyStr]]) -> ContextManager[IO[AnyStr]]: ...
+    def get_fileobject(self, dir: StrOrBytesPath | None = ..., **kwargs: Any) -> IO[Any]: ...
+    def sync(self, f: IO[Any]) -> None: ...
+    def commit(self, f: IO[Any]) -> None: ...
+    def rollback(self, f: IO[Any]) -> None: ...
+
+def atomic_write(path: StrOrBytesPath, writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object) -> ContextManager[IO[Any]]: ...