mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 22:11:54 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from random import Random
|
||||
from thread import LockType
|
||||
from typing import IO, Any, AnyStr, Iterable, Iterator, List, Text, Tuple, overload
|
||||
from typing import IO, Any, AnyStr, Iterable, Iterator, Text, overload
|
||||
|
||||
TMP_MAX: int
|
||||
tempdir: str
|
||||
@@ -39,7 +39,7 @@ class _TemporaryFileWrapper(IO[str]):
|
||||
def read(self, n: int = ...) -> str: ...
|
||||
def readable(self) -> bool: ...
|
||||
def readline(self, limit: int = ...) -> str: ...
|
||||
def readlines(self, hint: int = ...) -> List[str]: ...
|
||||
def readlines(self, hint: int = ...) -> list[str]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
def seekable(self) -> bool: ...
|
||||
def tell(self) -> int: ...
|
||||
@@ -82,9 +82,9 @@ class TemporaryDirectory:
|
||||
def __exit__(self, type, value, traceback) -> None: ...
|
||||
|
||||
@overload
|
||||
def mkstemp() -> Tuple[int, str]: ...
|
||||
def mkstemp() -> tuple[int, str]: ...
|
||||
@overload
|
||||
def mkstemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: AnyStr | None = ..., text: bool = ...) -> Tuple[int, AnyStr]: ...
|
||||
def mkstemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: AnyStr | None = ..., text: bool = ...) -> tuple[int, AnyStr]: ...
|
||||
@overload
|
||||
def mkdtemp() -> str: ...
|
||||
@overload
|
||||
@@ -95,6 +95,6 @@ def mktemp() -> str: ...
|
||||
def mktemp(suffix: AnyStr = ..., prefix: AnyStr = ..., dir: AnyStr | None = ...) -> AnyStr: ...
|
||||
def gettempdir() -> str: ...
|
||||
def gettempprefix() -> str: ...
|
||||
def _candidate_tempdir_list() -> List[str]: ...
|
||||
def _candidate_tempdir_list() -> list[str]: ...
|
||||
def _get_candidate_names() -> _RandomNameSequence | None: ...
|
||||
def _get_default_tempdir() -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user