Skip to content

Commit a3017c1

Browse files
authored
Use the Any trick
1 parent c04d9a4 commit a3017c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/tokenize.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Untokenizer:
132132

133133
# the docstring says "returns bytes" but is incorrect --
134134
# if the ENCODING token is missing, it skips the encode
135-
def untokenize(iterable: Iterable[_Token]) -> bytes | str: ...
135+
def untokenize(iterable: Iterable[_Token]) -> str | Any: ... # str in most use cases
136136
def detect_encoding(readline: Callable[[], bytes | bytearray]) -> tuple[str, Sequence[bytes]]: ...
137137
def tokenize(readline: Callable[[], bytes | bytearray]) -> Generator[TokenInfo, None, None]: ...
138138
def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo, None, None]: ...

0 commit comments

Comments
 (0)