diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-19 10:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-19 10:19:03 +0000 |
commit | ccce8747ac9170ce98d535ef527caa8867e5eef4 (patch) | |
tree | 6271d025d1f560e64d494c7a609daf2ba3e0f048 /pre_commit/languages/python.py | |
parent | Adding upstream version 3.1.1. (diff) | |
download | pre-commit-ccce8747ac9170ce98d535ef527caa8867e5eef4.tar.xz pre-commit-ccce8747ac9170ce98d535ef527caa8867e5eef4.zip |
Adding upstream version 3.2.0.upstream/3.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/languages/python.py')
-rw-r--r-- | pre_commit/languages/python.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py index 976674e..3ef3436 100644 --- a/pre_commit/languages/python.py +++ b/pre_commit/languages/python.py @@ -48,7 +48,7 @@ def _read_pyvenv_cfg(filename: str) -> dict[str, str]: def bin_dir(venv: str) -> str: """On windows there's a different directory for the virtualenv""" - bin_part = 'Scripts' if os.name == 'nt' else 'bin' + bin_part = 'Scripts' if sys.platform == 'win32' else 'bin' return os.path.join(venv, bin_part) @@ -137,7 +137,7 @@ def norm_version(version: str) -> str | None: elif _sys_executable_matches(version): # virtualenv defaults to our exe return None - if os.name == 'nt': # pragma: no cover (windows) + if sys.platform == 'win32': # pragma: no cover (windows) version_exec = _find_by_py_launcher(version) if version_exec: return version_exec |