mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Prior to this commit, a cached virtualenv could be erroneously re-used, causing failures in pre-commit hooks. This is caused by incorrect normalization in `get_default_version`, resulting in a cache key of `"python3"`, regardless of the minor version used. This commit updates the implementation of `get_default_version` for python-based hooks to return `os.path.realpath(sys.executable)`. This ensures that the correct python version is used for running pre-commit hooks. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conda.py | ||
| coursier.py | ||
| dart.py | ||
| docker.py | ||
| docker_image.py | ||
| dotnet.py | ||
| fail.py | ||
| golang.py | ||
| haskell.py | ||
| lua.py | ||
| node.py | ||
| perl.py | ||
| pygrep.py | ||
| python.py | ||
| r.py | ||
| ruby.py | ||
| rust.py | ||
| script.py | ||
| swift.py | ||
| system.py | ||