Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 committed Jan 16, 2025
1 parent fcd9cc5 commit 9e5b62b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions stdlib/tokenize.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ class Untokenizer:
if sys.version_info >= (3, 12):
def escape_brackets(self, token: str) -> str: ...

# the docstring says "returns bytes" but is incorrect --
# if the ENCODING token is missing, it skips the encode
def untokenize(iterable: Iterable[_Token]) -> str | Any: ... # str in most use cases
# Returns str, unless the ENCODING token is present, in which case it returns bytes.
def untokenize(iterable: Iterable[_Token]) -> str | Any: ...
def detect_encoding(readline: Callable[[], bytes | bytearray]) -> tuple[str, Sequence[bytes]]: ...
def tokenize(readline: Callable[[], bytes | bytearray]) -> Generator[TokenInfo, None, None]: ...
def generate_tokens(readline: Callable[[], str]) -> Generator[TokenInfo, None, None]: ...
Expand Down

0 comments on commit 9e5b62b

Please sign in to comment.