Use asottile/add-trailing-comma

This commit is contained in:
Anthony Sottile 2017-07-12 18:30:51 -07:00
parent 1a07a24d13
commit 0c70fa4229
32 changed files with 74 additions and 70 deletions

View file

@ -23,7 +23,7 @@ def md5(s): # pragma: windows no cover
def docker_tag(repo_cmd_runner): # pragma: windows no cover
return 'pre-commit-{}'.format(
md5(os.path.basename(repo_cmd_runner.path()))
md5(os.path.basename(repo_cmd_runner.path())),
).lower()
@ -92,7 +92,7 @@ def run_hook(repo_cmd_runner, hook, file_args): # pragma: windows no cover
'-v', '{}:/src:rw'.format(os.getcwd()),
'--workdir', '/src',
'--entrypoint', entry_executable,
docker_tag(repo_cmd_runner)
docker_tag(repo_cmd_runner),
) + cmd_rest
return xargs(cmd, file_args)

View file

@ -107,7 +107,7 @@ def install_environment(repo_cmd_runner, version, additional_dependencies):
with clean_path_on_failure(repo_cmd_runner.path(directory)):
venv_cmd = [
sys.executable, '-m', 'virtualenv',
'{{prefix}}{}'.format(directory)
'{{prefix}}{}'.format(directory),
]
if version != 'default':
venv_cmd.extend(['-p', norm_version(version)])

View file

@ -81,7 +81,7 @@ def _install_rbenv(
# directory
"export GEM_HOME='{directory}/gems'\n"
'export PATH="$GEM_HOME/bin:$PATH"\n'
'\n'.format(directory=repo_cmd_runner.path(directory))
'\n'.format(directory=repo_cmd_runner.path(directory)),
)
# If we aren't using the system ruby, add a version here