Skip to content

Commit a4dd508

Browse files
committed
Fix type check error
1 parent 3f9966c commit a4dd508

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/_pyrepl/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def gen_colors_from_token_stream(
239239
elif (
240240
token.string in COMMANDS
241241
and not prev_token
242-
and next_token.type == T.NEWLINE
242+
and (not next_token or next_token.type == T.NEWLINE)
243243
):
244244
span = Span.from_token(token, line_lengths)
245245
yield ColorSpan(span, "command")

0 commit comments

Comments
 (0)