Fix Shlex stubtest errors (#5135)

This commit is contained in:
hatal175
2021-03-24 05:56:47 +02:00
committed by GitHub
parent 88a8d0ccbc
commit 5b730d4ded
2 changed files with 3 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ class shlex(Iterable[str]):
punctuation_chars: str
def __init__(
self,
instream: Union[str, TextIO] = ...,
instream: Optional[Union[str, TextIO]] = ...,
infile: Optional[str] = ...,
posix: bool = ...,
punctuation_chars: Union[bool, str] = ...,
@@ -36,10 +36,10 @@ class shlex(Iterable[str]):
def get_token(self) -> str: ...
def push_token(self, tok: str) -> None: ...
def read_token(self) -> str: ...
def sourcehook(self, filename: str) -> Tuple[str, TextIO]: ...
def sourcehook(self, newfile: str) -> Tuple[str, TextIO]: ...
# TODO argument types
def push_source(self, newstream: Any, newfile: Any = ...) -> None: ...
def pop_source(self) -> None: ...
def error_leader(self, infile: str = ..., lineno: int = ...) -> None: ...
def error_leader(self, infile: Optional[str] = ..., lineno: Optional[int] = ...) -> None: ...
def __iter__(self: _SLT) -> _SLT: ...
def __next__(self) -> str: ...

View File

@@ -331,9 +331,6 @@ sched.Event.__doc__
select.poll
selectors.DevpollSelector
selectors.KqueueSelector
shlex.shlex.__init__
shlex.shlex.error_leader
shlex.shlex.sourcehook
shutil.register_unpack_format
signal.SIGEMT
signal.SIGINFO