upgrade hooks, pyupgrade pre-commit

This commit is contained in:
Anthony Sottile 2020-01-08 20:49:09 -08:00
parent 764c765d29
commit 30c1e8289f
91 changed files with 176 additions and 437 deletions

View file

@ -1,6 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import os.path
import re
import shutil
@ -473,7 +470,7 @@ def _norm_pwd(path):
# Under windows bash's temp and windows temp is different.
# This normalizes to the bash /tmp
return cmd_output_b(
'bash', '-c', "cd '{}' && pwd".format(path),
'bash', '-c', f"cd '{path}' && pwd",
)[1].strip()
@ -844,7 +841,7 @@ def test_manifest_hooks(tempdir_factory, store):
hook = _get_hook(config, store, 'bash_hook')
assert hook == Hook(
src='file://{}'.format(path),
src=f'file://{path}',
prefix=Prefix(mock.ANY),
additional_dependencies=[],
alias='',