mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user