summaryrefslogtreecommitdiffstats
path: root/pre_commit/languages/python.py
diff options
context:
space:
mode:
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']
)