mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from _typeshed import FileDescriptorLike
|
||||
from typing import IO, AnyStr, Dict, List, Mapping, NamedTuple, Sequence, Tuple, TypeVar
|
||||
from typing import IO, AnyStr, Mapping, NamedTuple, Sequence, TypeVar
|
||||
|
||||
error = OSError
|
||||
|
||||
confstr_names: Dict[str, int]
|
||||
environ: Dict[str, str]
|
||||
pathconf_names: Dict[str, int]
|
||||
sysconf_names: Dict[str, int]
|
||||
confstr_names: dict[str, int]
|
||||
environ: dict[str, str]
|
||||
pathconf_names: dict[str, int]
|
||||
sysconf_names: dict[str, int]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -112,7 +112,7 @@ def fchown(fd: int, uid: int, gid: int) -> None: ...
|
||||
def fdatasync(fd: FileDescriptorLike) -> None: ...
|
||||
def fdopen(fd: int, mode: str = ..., bufsize: int = ...) -> IO[str]: ...
|
||||
def fork() -> int: ...
|
||||
def forkpty() -> Tuple[int, int]: ...
|
||||
def forkpty() -> tuple[int, int]: ...
|
||||
def fpathconf(fd: int, name: str) -> None: ...
|
||||
def fstat(fd: int) -> stat_result: ...
|
||||
def fstatvfs(fd: int) -> statvfs_result: ...
|
||||
@@ -123,15 +123,15 @@ def getcwdu() -> unicode: ...
|
||||
def getegid() -> int: ...
|
||||
def geteuid() -> int: ...
|
||||
def getgid() -> int: ...
|
||||
def getgroups() -> List[int]: ...
|
||||
def getloadavg() -> Tuple[float, float, float]: ...
|
||||
def getgroups() -> list[int]: ...
|
||||
def getloadavg() -> tuple[float, float, float]: ...
|
||||
def getlogin() -> str: ...
|
||||
def getpgid(pid: int) -> int: ...
|
||||
def getpgrp() -> int: ...
|
||||
def getpid() -> int: ...
|
||||
def getppid() -> int: ...
|
||||
def getresgid() -> Tuple[int, int, int]: ...
|
||||
def getresuid() -> Tuple[int, int, int]: ...
|
||||
def getresgid() -> tuple[int, int, int]: ...
|
||||
def getresuid() -> tuple[int, int, int]: ...
|
||||
def getsid(pid: int) -> int: ...
|
||||
def getuid() -> int: ...
|
||||
def initgroups(username: str, gid: int) -> None: ...
|
||||
@@ -140,7 +140,7 @@ def kill(pid: int, sig: int) -> None: ...
|
||||
def killpg(pgid: int, sig: int) -> None: ...
|
||||
def lchown(path: unicode, uid: int, gid: int) -> None: ...
|
||||
def link(source: unicode, link_name: str) -> None: ...
|
||||
def listdir(path: AnyStr) -> List[AnyStr]: ...
|
||||
def listdir(path: AnyStr) -> list[AnyStr]: ...
|
||||
def lseek(fd: int, pos: int, how: int) -> None: ...
|
||||
def lstat(path: unicode) -> stat_result: ...
|
||||
def major(device: int) -> int: ...
|
||||
@@ -151,9 +151,9 @@ def mkfifo(path: unicode, mode: int = ...) -> None: ...
|
||||
def mknod(filename: unicode, mode: int = ..., device: int = ...) -> None: ...
|
||||
def nice(increment: int) -> int: ...
|
||||
def open(file: unicode, flags: int, mode: int = ...) -> int: ...
|
||||
def openpty() -> Tuple[int, int]: ...
|
||||
def openpty() -> tuple[int, int]: ...
|
||||
def pathconf(path: unicode, name: str) -> str: ...
|
||||
def pipe() -> Tuple[int, int]: ...
|
||||
def pipe() -> tuple[int, int]: ...
|
||||
def popen(command: str, mode: str = ..., bufsize: int = ...) -> IO[str]: ...
|
||||
def putenv(varname: str, value: str) -> None: ...
|
||||
def read(fd: int, n: int) -> str: ...
|
||||
@@ -182,20 +182,20 @@ def sysconf(name: str | int) -> int: ...
|
||||
def system(command: unicode) -> int: ...
|
||||
def tcgetpgrp(fd: int) -> int: ...
|
||||
def tcsetpgrp(fd: int, pg: int) -> None: ...
|
||||
def times() -> Tuple[float, float, float, float, float]: ...
|
||||
def times() -> tuple[float, float, float, float, float]: ...
|
||||
def tmpfile() -> IO[str]: ...
|
||||
def ttyname(fd: int) -> str: ...
|
||||
def umask(mask: int) -> int: ...
|
||||
def uname() -> Tuple[str, str, str, str, str]: ...
|
||||
def uname() -> tuple[str, str, str, str, str]: ...
|
||||
def unlink(path: unicode) -> None: ...
|
||||
def unsetenv(varname: str) -> None: ...
|
||||
def urandom(n: int) -> str: ...
|
||||
def utime(path: unicode, times: Tuple[int, int] | None) -> None: ...
|
||||
def utime(path: unicode, times: tuple[int, int] | None) -> None: ...
|
||||
def wait() -> int: ...
|
||||
|
||||
_r = Tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int]
|
||||
_r = tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int]
|
||||
|
||||
def wait3(options: int) -> Tuple[int, int, _r]: ...
|
||||
def wait4(pid: int, options: int) -> Tuple[int, int, _r]: ...
|
||||
def wait3(options: int) -> tuple[int, int, _r]: ...
|
||||
def wait4(pid: int, options: int) -> tuple[int, int, _r]: ...
|
||||
def waitpid(pid: int, options: int) -> int: ...
|
||||
def write(fd: int, str: str) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user