mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Fix CI by upgrading AP templates
This commit is contained in:
parent
31853d6c43
commit
fea76b9ea1
8 changed files with 39 additions and 34 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue