mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-28 11:58:36 -06:00
Address more @asottile's review comments
This commit is contained in:
@@ -68,6 +68,8 @@ def _find_by_sys_executable():
|
||||
def _get_default_version(): # pragma: no cover (platform dependent)
|
||||
# First attempt from `sys.executable` (or the realpath)
|
||||
exe = _find_by_sys_executable()
|
||||
if exe:
|
||||
return exe
|
||||
|
||||
# Next try the `pythonX.X` executable
|
||||
exe = 'python{}.{}'.format(*sys.version_info)
|
||||
|
||||
Reference in New Issue
Block a user