mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import StrOrBytesPath
|
||||
from os import PathLike, _ExecEnv, _ExecVArgs, stat_result as stat_result
|
||||
from typing import Any, Dict, Iterable, List, NamedTuple, Optional, Sequence, Tuple, overload
|
||||
from typing import Any, Dict, Iterable, List, NamedTuple, Sequence, Tuple, overload
|
||||
|
||||
class uname_result(NamedTuple):
|
||||
sysname: str
|
||||
@@ -159,7 +159,7 @@ XATTR_REPLACE: int
|
||||
XATTR_SIZE_MAX: int
|
||||
|
||||
@overload
|
||||
def listdir(path: Optional[str] = ...) -> List[str]: ...
|
||||
def listdir(path: str | None = ...) -> List[str]: ...
|
||||
@overload
|
||||
def listdir(path: bytes) -> List[bytes]: ...
|
||||
@overload
|
||||
@@ -173,26 +173,26 @@ if sys.platform != "win32" and sys.version_info >= (3, 8):
|
||||
argv: _ExecVArgs,
|
||||
env: _ExecEnv,
|
||||
*,
|
||||
file_actions: Optional[Sequence[Tuple[Any, ...]]] = ...,
|
||||
setpgroup: Optional[int] = ...,
|
||||
file_actions: Sequence[Tuple[Any, ...]] | None = ...,
|
||||
setpgroup: int | None = ...,
|
||||
resetids: bool = ...,
|
||||
setsid: bool = ...,
|
||||
setsigmask: Iterable[int] = ...,
|
||||
setsigdef: Iterable[int] = ...,
|
||||
scheduler: Optional[Tuple[Any, sched_param]] = ...,
|
||||
scheduler: Tuple[Any, sched_param] | None = ...,
|
||||
) -> int: ...
|
||||
def posix_spawnp(
|
||||
path: StrOrBytesPath,
|
||||
argv: _ExecVArgs,
|
||||
env: _ExecEnv,
|
||||
*,
|
||||
file_actions: Optional[Sequence[Tuple[Any, ...]]] = ...,
|
||||
setpgroup: Optional[int] = ...,
|
||||
file_actions: Sequence[Tuple[Any, ...]] | None = ...,
|
||||
setpgroup: int | None = ...,
|
||||
resetids: bool = ...,
|
||||
setsid: bool = ...,
|
||||
setsigmask: Iterable[int] = ...,
|
||||
setsigdef: Iterable[int] = ...,
|
||||
scheduler: Optional[Tuple[Any, sched_param]] = ...,
|
||||
scheduler: Tuple[Any, sched_param] | None = ...,
|
||||
) -> int: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
|
||||
Reference in New Issue
Block a user