From e432efb74bd4d5f55b688282c7d5720a47297311 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 1 Jul 2023 17:35:45 -0400 Subject: [PATCH] shlex.join is always available in 3.8+ --- pre_commit_hooks/destroyed_symlinks.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pre_commit_hooks/destroyed_symlinks.py b/pre_commit_hooks/destroyed_symlinks.py index 88253c0b..f2569085 100644 --- a/pre_commit_hooks/destroyed_symlinks.py +++ b/pre_commit_hooks/destroyed_symlinks.py @@ -76,11 +76,7 @@ def main(argv: Sequence[str] | None = None) -> int: for destroyed_link in destroyed_links: print(f'- {destroyed_link}') print('You should unstage affected files:') - print( - '\tgit reset HEAD -- {}'.format( - ' '.join(shlex.quote(link) for link in destroyed_links), - ), - ) + print(f'\tgit reset HEAD -- {shlex.join(destroyed_links)}') print( 'And retry commit. As a long term solution ' 'you may try to explicitly tell git that your '