Show More
@@ -14,7 +14,7 b' when a rule triggers wrong, do one of th' | |||||
14 | * doublecheck that it is a false match |
|
14 | * doublecheck that it is a false match | |
15 | * improve the rule pattern |
|
15 | * improve the rule pattern | |
16 | * add an ignore pattern to the rule (3rd arg) which matches your good line |
|
16 | * add an ignore pattern to the rule (3rd arg) which matches your good line | |
17 |
(you can append a short comment and match this, like: #re-raises |
|
17 | (you can append a short comment and match this, like: #re-raises) | |
18 | * change the pattern to a warning and list the exception in test-check-code-hg |
|
18 | * change the pattern to a warning and list the exception in test-check-code-hg | |
19 | * ONLY use no--check-code for skipping entire files from external sources |
|
19 | * ONLY use no--check-code for skipping entire files from external sources | |
20 | """ |
|
20 | """ |
@@ -200,10 +200,8 b' def list_stdlib_modules():' | |||||
200 | stdlib_prefixes.add(dirname) |
|
200 | stdlib_prefixes.add(dirname) | |
201 | for libpath in sys.path: |
|
201 | for libpath in sys.path: | |
202 | # We want to walk everything in sys.path that starts with |
|
202 | # We want to walk everything in sys.path that starts with | |
203 |
# something in stdlib_prefixes. |
|
203 | # something in stdlib_prefixes. | |
204 | # the ast module used by this script implies the availability |
|
204 | if not any(libpath.startswith(p) for p in stdlib_prefixes): | |
205 | # of any(). |
|
|||
206 | if not any(libpath.startswith(p) for p in stdlib_prefixes): # no-py24 |
|
|||
207 | continue |
|
205 | continue | |
208 | for top, dirs, files in os.walk(libpath): |
|
206 | for top, dirs, files in os.walk(libpath): | |
209 | for i, d in reversed(list(enumerate(dirs))): |
|
207 | for i, d in reversed(list(enumerate(dirs))): |
General Comments 0
You need to be logged in to leave comments.
Login now