Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,14 +1,14 @@
from typing import IO, Any, List, Optional, Text, TypeVar, Union
from typing import IO, Any, List, Text, TypeVar
def split(s: Optional[str], comments: bool = ..., posix: bool = ...) -> List[str]: ...
def split(s: str | None, comments: bool = ..., posix: bool = ...) -> List[str]: ...
_SLT = TypeVar("_SLT", bound=shlex)
class shlex:
def __init__(self, instream: Union[IO[Any], Text] = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ...
def __init__(self, instream: IO[Any] | Text = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ...
def __iter__(self: _SLT) -> _SLT: ...
def next(self) -> str: ...
def get_token(self) -> Optional[str]: ...
def get_token(self) -> str | None: ...
def push_token(self, _str: str) -> None: ...
def read_token(self) -> str: ...
def sourcehook(self, filename: str) -> None: ...
@@ -23,8 +23,8 @@ class shlex:
escapedquotes: str
whitespace_split: bool
infile: IO[Any]
source: Optional[str]
source: str | None
debug: int
lineno: int
token: Any
eof: Optional[str]
eof: str | None