stdlib: Fix some shlex types (#9941)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
Kevin Schoedel
2023-03-25 12:32:43 -04:00
committed by GitHub
parent 2e59b81ffd
commit ffe4a6d8bc

View File

@@ -29,7 +29,7 @@ class shlex(Iterable[str]):
debug: int
lineno: int
token: str
eof: str
eof: str | None
@property
def punctuation_chars(self) -> str: ...
def __init__(
@@ -39,12 +39,12 @@ class shlex(Iterable[str]):
posix: bool = False,
punctuation_chars: bool | str = False,
) -> None: ...
def get_token(self) -> str: ...
def get_token(self) -> str | None: ...
def push_token(self, tok: str) -> None: ...
def read_token(self) -> str: ...
def sourcehook(self, newfile: str) -> tuple[str, TextIO]: ...
def read_token(self) -> str | None: ...
def sourcehook(self, newfile: str) -> tuple[str, TextIO] | None: ...
def push_source(self, newstream: str | TextIO, newfile: str | None = None) -> None: ...
def pop_source(self) -> None: ...
def error_leader(self, infile: str | None = None, lineno: int | None = None) -> None: ...
def error_leader(self, infile: str | None = None, lineno: int | None = None) -> str: ...
def __iter__(self) -> Self: ...
def __next__(self) -> str: ...