Use lowercase tuple where possible (#6170)

This commit is contained in:
Akuli
2021-10-15 00:18:19 +00:00
committed by GitHub
parent 5f386b0575
commit 994b69ef8f
242 changed files with 1212 additions and 1224 deletions

View File

@@ -398,8 +398,8 @@ if sys.platform != "win32":
def getpriority(which: int, who: int) -> int: ...
def setpriority(which: int, who: int, priority: int) -> None: ...
if sys.platform != "darwin":
def getresuid() -> Tuple[int, int, int]: ...
def getresgid() -> Tuple[int, int, int]: ...
def getresuid() -> tuple[int, int, int]: ...
def getresgid() -> tuple[int, int, int]: ...
def getuid() -> int: ...
def setegid(__egid: int) -> None: ...
def seteuid(__euid: int) -> None: ...
@@ -528,7 +528,7 @@ def fstat(fd: int) -> stat_result: ...
def fsync(fd: FileDescriptorLike) -> None: ...
def lseek(__fd: int, __position: int, __how: int) -> int: ...
def open(path: StrOrBytesPath, flags: int, mode: int = ..., *, dir_fd: int | None = ...) -> int: ...
def pipe() -> Tuple[int, int]: ...
def pipe() -> tuple[int, int]: ...
def read(__fd: int, __length: int) -> bytes: ...
if sys.platform != "win32":
@@ -544,9 +544,9 @@ if sys.platform != "win32":
def set_blocking(__fd: int, __blocking: bool) -> None: ...
def isatty(__fd: int) -> bool: ...
def lockf(__fd: int, __command: int, __length: int) -> None: ...
def openpty() -> Tuple[int, int]: ... # some flavors of Unix
def openpty() -> tuple[int, int]: ... # some flavors of Unix
if sys.platform != "darwin":
def pipe2(flags: int) -> Tuple[int, int]: ... # some flavors of Unix
def pipe2(flags: int) -> tuple[int, int]: ... # some flavors of Unix
def posix_fallocate(fd: int, offset: int, length: int) -> None: ...
def posix_fadvise(fd: int, offset: int, length: int, advice: int) -> None: ...
def pread(__fd: int, __length: int, __offset: int) -> bytes: ...
@@ -675,9 +675,9 @@ def truncate(path: _FdOrAnyPath, length: int) -> None: ... # Unix only up to ve
def unlink(path: StrOrBytesPath, *, dir_fd: int | None = ...) -> None: ...
def utime(
path: _FdOrAnyPath,
times: Tuple[int, int] | Tuple[float, float] | None = ...,
times: tuple[int, int] | tuple[float, float] | None = ...,
*,
ns: Tuple[int, int] = ...,
ns: tuple[int, int] = ...,
dir_fd: int | None = ...,
follow_symlinks: bool = ...,
) -> None: ...
@@ -686,7 +686,7 @@ _OnError = Callable[[OSError], Any]
def walk(
top: AnyStr | PathLike[AnyStr], topdown: bool = ..., onerror: _OnError | None = ..., followlinks: bool = ...
) -> Iterator[Tuple[AnyStr, list[AnyStr], list[AnyStr]]]: ...
) -> Iterator[tuple[AnyStr, list[AnyStr], list[AnyStr]]]: ...
if sys.platform != "win32":
if sys.version_info >= (3, 7):
@@ -698,7 +698,7 @@ if sys.platform != "win32":
*,
follow_symlinks: bool = ...,
dir_fd: int | None = ...,
) -> Iterator[Tuple[str, list[str], list[str], int]]: ...
) -> Iterator[tuple[str, list[str], list[str], int]]: ...
@overload
def fwalk(
top: bytes,
@@ -707,7 +707,7 @@ if sys.platform != "win32":
*,
follow_symlinks: bool = ...,
dir_fd: int | None = ...,
) -> Iterator[Tuple[bytes, list[bytes], list[bytes], int]]: ...
) -> Iterator[tuple[bytes, list[bytes], list[bytes], int]]: ...
else:
def fwalk(
top: StrPath = ...,
@@ -716,7 +716,7 @@ if sys.platform != "win32":
*,
follow_symlinks: bool = ...,
dir_fd: int | None = ...,
) -> Iterator[Tuple[str, list[str], list[str], int]]: ...
) -> Iterator[tuple[str, list[str], list[str], int]]: ...
if sys.platform == "linux":
def getxattr(path: _FdOrAnyPath, attribute: StrOrBytesPath, *, follow_symlinks: bool = ...) -> bytes: ...
def listxattr(path: _FdOrAnyPath | None = ..., *, follow_symlinks: bool = ...) -> list[str]: ...
@@ -762,7 +762,7 @@ def kill(__pid: int, __signal: int) -> None: ...
if sys.platform != "win32":
# Unix only
def fork() -> int: ...
def forkpty() -> Tuple[int, int]: ... # some flavors of Unix
def forkpty() -> tuple[int, int]: ... # some flavors of Unix
def killpg(__pgid: int, __signal: int) -> None: ...
def nice(__increment: int) -> int: ...
if sys.platform != "darwin":
@@ -786,7 +786,7 @@ else:
def system(command: StrOrBytesPath) -> int: ...
def times() -> times_result: ...
def waitpid(__pid: int, __options: int) -> Tuple[int, int]: ...
def waitpid(__pid: int, __options: int) -> tuple[int, int]: ...
if sys.platform == "win32":
def startfile(path: StrOrBytesPath, operation: str | None = ...) -> None: ...
@@ -797,12 +797,12 @@ else:
def spawnlpe(mode: int, file: StrOrBytesPath, arg0: StrOrBytesPath, *args: Any) -> int: ... # Imprecise signature
def spawnvp(mode: int, file: StrOrBytesPath, args: _ExecVArgs) -> int: ...
def spawnvpe(mode: int, file: StrOrBytesPath, args: _ExecVArgs, env: _ExecEnv) -> int: ...
def wait() -> Tuple[int, int]: ... # Unix only
def wait() -> tuple[int, int]: ... # Unix only
if sys.platform != "darwin":
from posix import waitid_result
def waitid(idtype: int, ident: int, options: int) -> waitid_result: ...
def wait3(options: int) -> Tuple[int, int, Any]: ...
def wait4(pid: int, options: int) -> Tuple[int, int, Any]: ...
def wait3(options: int) -> tuple[int, int, Any]: ...
def wait4(pid: int, options: int) -> tuple[int, int, Any]: ...
def WCOREDUMP(__status: int) -> bool: ...
def WIFCONTINUED(status: int) -> bool: ...
def WIFSTOPPED(status: int) -> bool: ...
@@ -833,7 +833,7 @@ def cpu_count() -> int | None: ...
if sys.platform != "win32":
# Unix only
def confstr(__name: str | int) -> str | None: ...
def getloadavg() -> Tuple[float, float, float]: ...
def getloadavg() -> tuple[float, float, float]: ...
def sysconf(__name: str | int) -> int: ...
if sys.platform == "linux":