mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-13 10:20:42 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from typing import Any, AnyStr, IO, Iterable, Iterator, List, Optional, overload, Text, Tuple, Union
|
||||
from thread import LockType
|
||||
from random import Random
|
||||
from thread import LockType
|
||||
from typing import IO, Any, AnyStr, Iterable, Iterator, List, Optional, Text, Tuple, Union, overload
|
||||
|
||||
TMP_MAX: int
|
||||
tempdir: str
|
||||
@@ -48,7 +48,6 @@ class _TemporaryFileWrapper(IO[str]):
|
||||
def write(self, s: Text) -> int: ...
|
||||
def writelines(self, lines: Iterable[str]) -> None: ...
|
||||
|
||||
|
||||
# TODO text files
|
||||
|
||||
def TemporaryFile(
|
||||
@@ -56,36 +55,30 @@ def TemporaryFile(
|
||||
bufsize: int = ...,
|
||||
suffix: Union[bytes, unicode] = ...,
|
||||
prefix: Union[bytes, unicode] = ...,
|
||||
dir: Union[bytes, unicode] = ...
|
||||
) -> _TemporaryFileWrapper:
|
||||
...
|
||||
|
||||
dir: Union[bytes, unicode] = ...,
|
||||
) -> _TemporaryFileWrapper: ...
|
||||
def NamedTemporaryFile(
|
||||
mode: Union[bytes, unicode] = ...,
|
||||
bufsize: int = ...,
|
||||
suffix: Union[bytes, unicode] = ...,
|
||||
prefix: Union[bytes, unicode] = ...,
|
||||
dir: Union[bytes, unicode] = ...,
|
||||
delete: bool = ...
|
||||
) -> _TemporaryFileWrapper:
|
||||
...
|
||||
|
||||
delete: bool = ...,
|
||||
) -> _TemporaryFileWrapper: ...
|
||||
def SpooledTemporaryFile(
|
||||
max_size: int = ...,
|
||||
mode: Union[bytes, unicode] = ...,
|
||||
buffering: int = ...,
|
||||
suffix: Union[bytes, unicode] = ...,
|
||||
prefix: Union[bytes, unicode] = ...,
|
||||
dir: Union[bytes, unicode] = ...
|
||||
) -> _TemporaryFileWrapper:
|
||||
...
|
||||
dir: Union[bytes, unicode] = ...,
|
||||
) -> _TemporaryFileWrapper: ...
|
||||
|
||||
class TemporaryDirectory:
|
||||
name: Any
|
||||
def __init__(self,
|
||||
suffix: Union[bytes, unicode] = ...,
|
||||
prefix: Union[bytes, unicode] = ...,
|
||||
dir: Union[bytes, unicode] = ...) -> None: ...
|
||||
def __init__(
|
||||
self, suffix: Union[bytes, unicode] = ..., prefix: Union[bytes, unicode] = ..., dir: Union[bytes, unicode] = ...
|
||||
) -> None: ...
|
||||
def cleanup(self) -> None: ...
|
||||
def __enter__(self) -> Any: ... # Can be str or unicode
|
||||
def __exit__(self, type, value, traceback) -> None: ...
|
||||
@@ -93,8 +86,7 @@ class TemporaryDirectory:
|
||||
@overload
|
||||
def mkstemp() -> Tuple[int, str]: ...
|
||||
@overload
|
||||
def mkstemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: Optional[AnyStr] = ...,
|
||||
text: bool = ...) -> Tuple[int, AnyStr]: ...
|
||||
def mkstemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: Optional[AnyStr] = ..., text: bool = ...) -> Tuple[int, AnyStr]: ...
|
||||
@overload
|
||||
def mkdtemp() -> str: ...
|
||||
@overload
|
||||
@@ -105,7 +97,6 @@ def mktemp() -> str: ...
|
||||
def mktemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: Optional[AnyStr] = ...) -> AnyStr: ...
|
||||
def gettempdir() -> str: ...
|
||||
def gettempprefix() -> str: ...
|
||||
|
||||
def _candidate_tempdir_list() -> List[str]: ...
|
||||
def _get_candidate_names() -> Optional[_RandomNameSequence]: ...
|
||||
def _get_default_tempdir() -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user