mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use asottile/add-trailing-comma
This commit is contained in:
parent
1a07a24d13
commit
0c70fa4229
32 changed files with 74 additions and 70 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)])
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue