| 1 |
#require test-repo pyflakes hg10 |
| 2 |
|
| 3 |
$ . "$TESTDIR/helpers-testrepo.sh" |
| 4 |
|
| 5 |
run pyflakes on all tracked files ending in .py or without a file ending |
| 6 |
(skipping binary file random-seed) |
| 7 |
|
| 8 |
$ cat > test.py <<EOF |
| 9 |
> print(undefinedname) |
| 10 |
> EOF |
| 11 |
$ pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
| 12 |
test.py:1:* undefined name 'undefinedname' (glob) |
| 13 |
|
| 14 |
$ cd "`dirname "$TESTDIR"`" |
| 15 |
|
| 16 |
$ testrepohg locate 'set:**.py or grep("^#!.*python")' \ |
| 17 |
> -X hgext/fsmonitor/pywatchman \ |
| 18 |
> -X contrib/python-zstandard \ |
| 19 |
> -X mercurial/thirdparty \ |
| 20 |
> 2>/dev/null \ |
| 21 |
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
| 22 |
contrib/perf.py:*:* undefined name 'xrange' (glob) (?) |
| 23 |
hgext/zeroconf/__init__.py:*:*: `global server` is unused: name is never assigned in scope (glob) (?) |
| 24 |
mercurial/pycompat.py:*:* 'codecs' imported but unused (glob) |
| 25 |
mercurial/pycompat.py:*:* 'concurrent.futures' imported but unused (glob) |
| 26 |
mercurial/pycompat.py:*:* 'http.client as httplib' imported but unused (glob) |
| 27 |
mercurial/pycompat.py:*:* 'http.cookiejar as cookielib' imported but unused (glob) |
| 28 |
mercurial/pycompat.py:*:* 'io' imported but unused (glob) |
| 29 |
mercurial/pycompat.py:*:* 'queue' imported but unused (glob) |
| 30 |
mercurial/pycompat.py:*:* 'socketserver' imported but unused (glob) |
| 31 |
mercurial/pycompat.py:*:* 'xmlrpc.client as xmlrpclib' imported but unused (glob) |
| 32 |
mercurial/util.py:*:* 'pickle' imported but unused (glob) |
| 33 |
mercurial/util.py:*:*: `global _re2` is unused: name is never assigned in scope (glob) (?) |
| 34 |
|