massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / atomicwrites / atomicwrites / __init__.pyi
1 from _typeshed import StrOrBytesPath
2 from typing import IO, Any, AnyStr, Callable, ContextManager, Text, Type
3
4 def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
5 def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
6
7 class AtomicWriter(object):
8     def __init__(self, path: StrOrBytesPath, mode: Text = ..., overwrite: bool = ...) -> None: ...
9     def open(self) -> ContextManager[IO[Any]]: ...
10     def _open(self, get_fileobject: Callable[..., IO[AnyStr]]) -> ContextManager[IO[AnyStr]]: ...
11     def get_fileobject(self, dir: StrOrBytesPath | None = ..., **kwargs: Any) -> IO[Any]: ...
12     def sync(self, f: IO[Any]) -> None: ...
13     def commit(self, f: IO[Any]) -> None: ...
14     def rollback(self, f: IO[Any]) -> None: ...
15
16 def atomic_write(path: StrOrBytesPath, writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object) -> ContextManager[IO[Any]]: ...