Skip to content

Commit

Permalink
Fix new mypy error in blib2to3
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed May 3, 2023
1 parent e712e48 commit 1001d92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/blib2to3/pgen2/tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def _combinations(*l):
'"""': double3prog,
**{f"{prefix}'''": single3prog for prefix in _strprefixes},
**{f'{prefix}"""': double3prog for prefix in _strprefixes},
**{prefix: None for prefix in _strprefixes},
}

triple_quoted: Final = (
Expand Down Expand Up @@ -601,9 +600,10 @@ def generate_tokens(
strstart = (lnum, start)
endprog = (
endprogs[initial]
or endprogs[token[1]]
or endprogs[token[2]]
or endprogs.get(token[1])
or endprogs.get(token[2])
)
assert endprog is not None, f"endprog not found for {token}"
contstr, needcont = line[start:], 1
contline = line
break
Expand Down

0 comments on commit 1001d92

Please sign in to comment.