Mercurial > public > mercurial-scm > hg
diff tests/hghave.py @ 52059:43602c675b4f
tests: use pyflakes as a tool, not a python module
The usage of pyflakes as a Python module was introduced in e397c6d74652, to work
around issue between Python 2 and Python 3. This issues are long behind us now
and we can get beck to using pyflakes as a tool, giving us more flexibility
about how we install it.
The `hghave` requirements is modified to check that we have a tool available,
instead of a python module.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 23 Oct 2024 16:14:13 +0200 |
parents | 73cf8b56c2f5 |
children | b2e90465daf6 |
line wrap: on
line diff
--- 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")