summaryrefslogtreecommitdiffstats
path: root/pre_commit/languages/python.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-08-30 11:22:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-08-30 11:22:57 +0000
commit16e677e925131974acbd67131124e11301d127b4 (patch)
treedc6734c39114c88aeeeb6b72c46b141489cd66f5 /pre_commit/languages/python.py
parentReleasing debian version 2.6.0-1. (diff)
downloadpre-commit-16e677e925131974acbd67131124e11301d127b4.tar.xz
pre-commit-16e677e925131974acbd67131124e11301d127b4.zip
Merging upstream version 2.7.1.
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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py
index 6f7c900..7a68580 100644
--- a/pre_commit/languages/python.py
+++ b/pre_commit/languages/python.py
@@ -191,7 +191,8 @@ def healthy(prefix: Prefix, language_version: str) -> bool:
return (
'version_info' in cfg and
- _version_info(py_exe) == cfg['version_info'] and (
+ # always use uncached lookup here in case we replaced an unhealthy env
+ _version_info.__wrapped__(py_exe) == cfg['version_info'] and (
'base-executable' not in cfg or
_version_info(cfg['base-executable']) == cfg['version_info']
)