Commit Graph

20 Commits

Author SHA1 Message Date
Mads Kiilerich
5d1360e0ed cleanup: make sure we always access members of imported modules
This will make sure we get import errors, even if demandimport is enabled.

This will also mute some pyflakes 'imported but unused' warnings.
2014-08-15 04:37:45 +02:00
Matt Mackall
a2b42e253a tests: fix pyflakes test whitespace breakage 2014-08-06 12:16:58 -05:00
Matt Mackall
241d2dc08e tests: change some #ifs to #requires 2014-08-06 11:53:08 -05:00
Matt Mackall
88809bfcbd filterpyflakes: make memoryview filtering unconditional 2014-05-13 19:22:40 -05:00
FUJIWARA Katsunori
6750e4199f tests: ignore "undefined name 'memoryview'" pyflakes error on earlier Python
Before this patch, "test-check-pyflakes.t" shows unexpected "undefined
name 'memoryview'" error for "mercurial/util.py" on Python 2.6.x or
earlier, because they don't define symbol 'memoryview'.

This patch introduces excluding patterns into "filterpyflakes.py" to
ignore "undefined name 'memoryview'" pyflakes error on Python 2.6.x or
earlier
2014-05-09 08:44:53 +09:00
Matt Mackall
bceb50a9b8 tests: use locate to find files for pyflakes check
Based on a suggestion by Yuya Nishihara
2014-05-02 00:23:58 -05:00
Matt Mackall
36234f5a00 tests: add repository check for pyflakes test
If this test was run from a tarball with no Mercurial repository, it
would fail because 'hg manifest' didn't work.
2014-05-01 09:42:23 -05:00
Matt Mackall
eb09e501b5 tests: fix unused imports from inotify removal caught by pyflakes 2014-03-04 09:56:59 -06:00
Matt Mackall
66c8bd54e8 extensions: remove the inotify extension (BC)
This extension has always had correctness issues and has been
unmaintained for years. It is now removed in favor of the third-party
hgwatchman which is maintained and appears to be correct.

Users with inotify enabled in their config files will fall back to
standard status performance.
2014-03-01 16:20:15 -06:00
Simon Heimberg
6059e06d0f cleanup: drop unused variables and an unused import 2013-07-01 20:48:56 +02:00
Simon Heimberg
752411a141 tests: run pyflakes on files from manifest which could be python files
Skip a binary file because pyflakes 0.4.0 aborts on it.
2013-07-01 20:48:55 +02:00
Thomas Arendsen Hein
21bb7c4cdc tests: make tests work if directory contains special characters
With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".
2012-04-03 19:06:35 +02:00
Matt Mackall
8971e5af3c check-code: fix issues with finding patterns in unified tests, fix tests
- old-style patterns without ^ were getting improperly anchored
- finditer was matching against beginning of line poorly
- \s was matching newlines
- [^x] was matching newlines

so we:

- remove earlier hacks for multiline matching
- fix unified test anchoring by adding .*
- replace \s with [ \t]
- replace [^x] with [^\nx]
- force all matches into multiline mode so ^ anchors work

This uncovers a number of test issues that are then repaired.
2011-10-27 17:22:04 -05:00
Matt Mackall
944b7f7b5c pyflakes: clean up some import noise 2011-10-11 23:16:05 -05:00
Adrian Buehlmann
b58d26815b windows: eliminate win32 wildcard import 2011-07-29 00:39:27 +02:00
Adrian Buehlmann
f1218befa0 util: eliminate wildcard imports 2011-07-23 12:29:52 +02:00
Matt Mackall
66805ccfed revlog: stop exporting node.short 2011-05-21 15:01:28 -05:00
timeless
1760e54c82 test: add pyflakes checking for unable to detect undefined names 2011-05-01 17:36:16 +02:00
timeless
1e24d74cfd test-pyflake: improve sorting algorithm 2011-05-01 18:56:27 +02:00
timeless
75e43f8a4b tests: add pyflakes checking for unused imports 2011-05-01 15:22:30 +02:00