From ffe4a6d8bc6016070ec0cad13840647451f7c096 Mon Sep 17 00:00:00 2001 From: Kevin Schoedel <67607049+kpschoedel@users.noreply.github.com> Date: Sat, 25 Mar 2023 12:32:43 -0400 Subject: [PATCH] stdlib: Fix some shlex types (#9941) Co-authored-by: Akuli --- stdlib/shlex.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stdlib/shlex.pyi b/stdlib/shlex.pyi index fa04932db..c4fd23d60 100644 --- a/stdlib/shlex.pyi +++ b/stdlib/shlex.pyi @@ -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: ...