tests/hghave.py
changeset 52059 43602c675b4f
parent 52058 73cf8b56c2f5
child 52109 b2e90465daf6
--- a/tests/hghave.py	Tue Oct 22 15:50:47 2024 +0200
+++ b/tests/hghave.py	Wed Oct 23 16:14:13 2024 +0200
@@ -609,14 +609,7 @@
 
 @check("pyflakes", "Pyflakes python linter")
 def has_pyflakes():
-    try:
-        import pyflakes
-
-        pyflakes.__version__
-    except ImportError:
-        return False
-    else:
-        return True
+    return matchoutput("pyflakes --version", br"^\d+\.\d+\.\d+\b", True)
 
 
 @check("pylint", "Pylint python linter")