Skip to content

Commit 8bf22bd

Browse files
authored
Merge pull request pre-commit#2917 from pre-commit/py38-shelx-join
shlex.join is always available in 3.8+
2 parents 3126802 + 1c439b5 commit 8bf22bd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pre_commit/commands/install_uninstall.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ def _install_hook_script(
103103

104104
hook_file.write(before + TEMPLATE_START)
105105
hook_file.write(f'INSTALL_PYTHON={shlex.quote(sys.executable)}\n')
106-
# TODO: python3.8+: shlex.join
107-
args_s = ' '.join(shlex.quote(part) for part in args)
106+
args_s = shlex.join(args)
108107
hook_file.write(f'ARGS=({args_s})\n')
109108
hook_file.write(TEMPLATE_END + after)
110109
make_executable(hook_path)

0 commit comments

Comments
 (0)