Mark atomicwrites as complete (#8883)

This commit is contained in:
Nikita Sobolev
2022-10-12 00:28:39 +03:00
committed by GitHub
parent 708996dff0
commit 5ca2d77f85
3 changed files with 10 additions and 2 deletions

View File

@@ -1 +0,0 @@
atomicwrites.AtomicWriter.get_fileobject

View File

@@ -1 +1,4 @@
version = "1.4.*"
[tool.stubtest]
ignore_missing_stub = false

View File

@@ -2,6 +2,10 @@ from _typeshed import StrOrBytesPath
from collections.abc import Callable
from contextlib import AbstractContextManager
from typing import IO, Any, AnyStr
from typing_extensions import Literal
PY2: Literal[False]
DEFAULT_MODE: Literal["w"]
def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
@@ -10,7 +14,9 @@ class AtomicWriter:
def __init__(self, path: StrOrBytesPath, mode: str = ..., overwrite: bool = ...) -> None: ...
def open(self) -> AbstractContextManager[IO[Any]]: ...
def _open(self, get_fileobject: Callable[..., IO[AnyStr]]) -> AbstractContextManager[IO[AnyStr]]: ...
def get_fileobject(self, dir: StrOrBytesPath | None = ..., **kwargs: Any) -> IO[Any]: ...
def get_fileobject(
self, suffix: str = ..., prefix: str = ..., 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: ...