mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
atomicwrites: add pyi file (#705)
Authorized by atomicwrites author here: https://github.com/untitaker/python-atomicwrites/pull/23#issuecomment-260422021
This commit is contained in:
committed by
Guido van Rossum
parent
62e57618d9
commit
d18484095e
16
third_party/2and3/atomicwrites/__init__.pyi
vendored
Normal file
16
third_party/2and3/atomicwrites/__init__.pyi
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import contextlib
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
from typing import Any, AnyStr, Callable, IO, Iterator, Text
|
||||
def replace_atomic(src: AnyStr, dst: AnyStr) -> None: ...
|
||||
def move_atomic(src: AnyStr, dst: AnyStr) -> None: ...
|
||||
class AtomicWriter(object):
|
||||
def __init__(self, path: AnyStr, mode: Text='w', overwrite: bool=False) -> None: ...
|
||||
def open(self) -> contextlib.ContextManager[IO]: ...
|
||||
def _open(self, get_fileobject: Callable) -> contextlib.ContextManager[IO]: ...
|
||||
def get_fileobject(self, dir: AnyStr=None, **kwargs) -> IO: ...
|
||||
def sync(self, f: IO) -> None: ...
|
||||
def commit(self, f: IO) -> None: ...
|
||||
def rollback(self, f: IO) -> None: ...
|
||||
def atomic_write(path: AnyStr, writer_cls: type=AtomicWriter, **cls_kwargs) -> contextlib.ContextManager[IO]: ...
|
||||
Reference in New Issue
Block a user