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:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-08-30 11:22:53 +0000
commit6cfa8e0963e9a518a25528a248932fcf41b4f969 (patch)
tree6882a2a7a3214ef85d7a946f2506e9ed2c3f60f5 /pre_commit/languages/python.py
parentAdding upstream version 2.6.0. (diff)
downloadpre-commit-upstream/2.7.1.tar.xz
pre-commit-upstream/2.7.1.zip
Adding upstream version 2.7.1.upstream/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']
)