mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 16:27:08 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user