Fix CI by upgrading AP templates

This commit is contained in:
Anthony Sottile 2020-02-03 08:41:48 -08:00
parent 31853d6c43
commit fea76b9ea1
8 changed files with 39 additions and 34 deletions

View file

@ -45,9 +45,8 @@ def fix_strings(filename): # type: (str) -> int
splitcontents = list(contents)
# Iterate in reverse so the offsets are always correct
tokens = reversed(list(tokenize.generate_tokens(
io.StringIO(contents).readline,
)))
tokens_l = list(tokenize.generate_tokens(io.StringIO(contents).readline))
tokens = reversed(tokens_l)
for token_type, token_text, (srow, scol), (erow, ecol), _ in tokens:
if token_type == tokenize.STRING:
new_text = handle_match(token_text)