We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31c4c37 commit 2f51b9dCopy full SHA for 2f51b9d
1 file changed
pre_commit/commands/install_uninstall.py
@@ -56,8 +56,8 @@ def shebang() -> str:
56
# Homebrew/homebrew-core#35825: be more timid about appropriate `PATH`
57
path_choices = [p for p in os.defpath.split(os.pathsep) if p]
58
exe_choices = [
59
- 'python{}'.format('.'.join(str(v) for v in sys.version_info[:i]))
60
- for i in range(3)
+ f'python{sys.version_info[0]}.{sys.version_info[1]}',
+ f'python{sys.version_info[0]}',
61
]
62
for path, exe in itertools.product(path_choices, exe_choices):
63
if os.path.exists(os.path.join(path, exe)):
0 commit comments