Show More
@@ -609,14 +609,7 def has_root(): | |||||
609 |
|
609 | |||
610 | @check("pyflakes", "Pyflakes python linter") |
|
610 | @check("pyflakes", "Pyflakes python linter") | |
611 | def has_pyflakes(): |
|
611 | def has_pyflakes(): | |
612 | try: |
|
612 | return matchoutput("pyflakes --version", br"^\d+\.\d+\.\d+\b", True) | |
613 | import pyflakes |
|
|||
614 |
|
||||
615 | pyflakes.__version__ |
|
|||
616 | except ImportError: |
|
|||
617 | return False |
|
|||
618 | else: |
|
|||
619 | return True |
|
|||
620 |
|
613 | |||
621 |
|
614 | |||
622 | @check("pylint", "Pylint python linter") |
|
615 | @check("pylint", "Pylint python linter") |
@@ -8,7 +8,7 run pyflakes on all tracked files ending | |||||
8 | $ cat > test.py <<EOF |
|
8 | $ cat > test.py <<EOF | |
9 | > print(undefinedname) |
|
9 | > print(undefinedname) | |
10 | > EOF |
|
10 | > EOF | |
11 |
$ |
|
11 | $ pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py" | |
12 | test.py:1:* undefined name 'undefinedname' (glob) |
|
12 | test.py:1:* undefined name 'undefinedname' (glob) | |
13 |
|
13 | |||
14 | $ cd "`dirname "$TESTDIR"`" |
|
14 | $ cd "`dirname "$TESTDIR"`" | |
@@ -18,7 +18,7 run pyflakes on all tracked files ending | |||||
18 | > -X contrib/python-zstandard \ |
|
18 | > -X contrib/python-zstandard \ | |
19 | > -X mercurial/thirdparty \ |
|
19 | > -X mercurial/thirdparty \ | |
20 | > 2>/dev/null \ |
|
20 | > 2>/dev/null \ | |
21 |
> | xargs |
|
21 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" | |
22 | contrib/perf.py:*:* undefined name 'xrange' (glob) (?) |
|
22 | contrib/perf.py:*:* undefined name 'xrange' (glob) (?) | |
23 | mercurial/pycompat.py:*:* 'codecs' imported but unused (glob) |
|
23 | mercurial/pycompat.py:*:* 'codecs' imported but unused (glob) | |
24 | mercurial/pycompat.py:*:* 'concurrent.futures' imported but unused (glob) |
|
24 | mercurial/pycompat.py:*:* 'concurrent.futures' imported but unused (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now