Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,5 +1,5 @@
import sys
from typing import Any, Iterable, List, Optional, TextIO, Tuple, TypeVar, Union
from typing import Any, Iterable, List, TextIO, Tuple, TypeVar
def split(s: str, comments: bool = ..., posix: bool = ...) -> List[str]: ...
@@ -28,10 +28,10 @@ class shlex(Iterable[str]):
punctuation_chars: str
def __init__(
self,
instream: Optional[Union[str, TextIO]] = ...,
infile: Optional[str] = ...,
instream: str | TextIO | None = ...,
infile: str | None = ...,
posix: bool = ...,
punctuation_chars: Union[bool, str] = ...,
punctuation_chars: bool | str = ...,
) -> None: ...
def get_token(self) -> str: ...
def push_token(self, tok: str) -> None: ...
@@ -40,6 +40,6 @@ class shlex(Iterable[str]):
# TODO argument types
def push_source(self, newstream: Any, newfile: Any = ...) -> None: ...
def pop_source(self) -> None: ...
def error_leader(self, infile: Optional[str] = ..., lineno: Optional[int] = ...) -> None: ...
def error_leader(self, infile: str | None = ..., lineno: int | None = ...) -> None: ...
def __iter__(self: _SLT) -> _SLT: ...
def __next__(self) -> str: ...