Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed May 3, 2023
1 parent 1001d92 commit e9678f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/blib2to3/pgen2/tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,12 +598,13 @@ def generate_tokens(
):
if token[-1] == "\n": # continued string
strstart = (lnum, start)
endprog = (
maybe_endprog = (
endprogs[initial]
or endprogs.get(token[1])
or endprogs.get(token[2])
)
assert endprog is not None, f"endprog not found for {token}"
assert maybe_endprog is not None, f"endprog not found for {token}"
endprog = maybe_endprog
contstr, needcont = line[start:], 1
contline = line
break
Expand Down

0 comments on commit e9678f4

Please sign in to comment.