mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-17 07:14:12 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
2
stubs/atomicwrites/METADATA.toml
Normal file
2
stubs/atomicwrites/METADATA.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
version = "0.1"
|
||||
python2 = true
|
||||
16
stubs/atomicwrites/atomicwrites/__init__.pyi
Normal file
16
stubs/atomicwrites/atomicwrites/__init__.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from _typeshed import AnyPath
|
||||
from typing import IO, Any, AnyStr, Callable, ContextManager, Optional, 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: AnyPath, 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: Optional[AnyPath] = ..., **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: AnyPath, writer_cls: Type[AtomicWriter] = ..., **cls_kwargs: object) -> ContextManager[IO[Any]]: ...
|
||||
Reference in New Issue
Block a user