diff --git a/stdlib/shlex.pyi b/stdlib/shlex.pyi index a979ac077..46998c596 100644 --- a/stdlib/shlex.pyi +++ b/stdlib/shlex.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import Self -from typing import Any, Iterable, TextIO +from typing import Iterable, TextIO def split(s: str, comments: bool = ..., posix: bool = ...) -> list[str]: ... @@ -17,7 +17,7 @@ class shlex(Iterable[str]): quotes: str escapedquotes: str whitespace_split: bool - infile: str + infile: str | None instream: TextIO source: str debug: int @@ -36,8 +36,7 @@ class shlex(Iterable[str]): def push_token(self, tok: str) -> None: ... def read_token(self) -> str: ... def sourcehook(self, newfile: str) -> tuple[str, TextIO]: ... - # TODO argument types - def push_source(self, newstream: Any, newfile: Any = ...) -> None: ... + def push_source(self, newstream: str | TextIO, newfile: str | None = ...) -> None: ... def pop_source(self) -> None: ... def error_leader(self, infile: str | None = ..., lineno: int | None = ...) -> None: ... def __iter__(self: Self) -> Self: ...