Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c439b5

Browse files
committed
shlex.join is always available in 3.8+
1 parent 3126802 commit 1c439b5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)