Show More
@@ -7,7 +7,7 b' def lowerwrap(scope, funcname):' | |||
|
7 | 7 | d, base = os.path.split(fname) |
|
8 | 8 | try: |
|
9 | 9 | files = os.listdir(d or '.') |
|
10 |
except OSError |
|
|
10 | except OSError: | |
|
11 | 11 | files = [] |
|
12 | 12 | if base in files: |
|
13 | 13 | return f(fname, *args, **kwargs) |
@@ -337,13 +337,12 b' def _preparepats():' | |||
|
337 | 337 | for pats in failandwarn: |
|
338 | 338 | for i, pseq in enumerate(pats): |
|
339 | 339 | # fix-up regexes for multi-line searches |
|
340 |
|
|
|
340 | p = pseq[0] | |
|
341 | 341 | # \s doesn't match \n |
|
342 | 342 | p = re.sub(r'(?<!\\)\\s', r'[ \\t]', p) |
|
343 | 343 | # [^...] doesn't match newline |
|
344 | 344 | p = re.sub(r'(?<!\\)\[\^', r'[^\\n', p) |
|
345 | 345 | |
|
346 | #print po, '=>', p | |
|
347 | 346 | pats[i] = (re.compile(p, re.MULTILINE),) + pseq[1:] |
|
348 | 347 | filters = c[2] |
|
349 | 348 | for i, flt in enumerate(filters): |
@@ -48,7 +48,6 b' def build_pattern(mapping=MAPPING):' | |||
|
48 | 48 | mod_list = ' | '.join(["'%s' '.' ('%s')" % |
|
49 | 49 | (key, "' | '".join(packages[key])) for key in packages]) |
|
50 | 50 | mod_list = '(' + mod_list + ' )' |
|
51 | bare_names = alternates(mapping.keys()) | |
|
52 | 51 | |
|
53 | 52 | yield """name_import=import_name< 'import' module_name=dotted_name< %s > > |
|
54 | 53 | """ % mod_list |
@@ -175,7 +175,7 b' def perfpathcopies(ui, repo, rev1, rev2)' | |||
|
175 | 175 | def perfmanifest(ui, repo): |
|
176 | 176 | def d(): |
|
177 | 177 | t = repo.manifest.tip() |
|
178 |
|
|
|
178 | repo.manifest.read(t) | |
|
179 | 179 | repo.manifest.mapcache = None |
|
180 | 180 | repo.manifest._cache = None |
|
181 | 181 | timer(d) |
@@ -184,7 +184,7 b' def perfmanifest(ui, repo):' | |||
|
184 | 184 | def perfchangeset(ui, repo, rev): |
|
185 | 185 | n = repo[rev].node() |
|
186 | 186 | def d(): |
|
187 |
|
|
|
187 | repo.changelog.read(n) | |
|
188 | 188 | #repo.changelog._cache = None |
|
189 | 189 | timer(d) |
|
190 | 190 |
@@ -3,7 +3,7 b'' | |||
|
3 | 3 | from mercurial import demandimport |
|
4 | 4 | demandimport.enable() |
|
5 | 5 | |
|
6 |
import |
|
|
6 | import sys | |
|
7 | 7 | from mercurial.i18n import _ |
|
8 | 8 | from mercurial import simplemerge, fancyopts, util, ui |
|
9 | 9 |
@@ -981,7 +981,6 b' class Translator(nodes.NodeVisitor):' | |||
|
981 | 981 | # Level is too low to display: |
|
982 | 982 | # raise nodes.SkipNode |
|
983 | 983 | attr = {} |
|
984 | backref_text = '' | |
|
985 | 984 | if node.hasattr('id'): |
|
986 | 985 | attr['name'] = node['id'] |
|
987 | 986 | if node.hasattr('line'): |
@@ -105,7 +105,7 b' def has_inotify():' | |||
|
105 | 105 | sock = socket.socket(socket.AF_UNIX) |
|
106 | 106 | try: |
|
107 | 107 | sock.bind(name) |
|
108 |
except socket.error |
|
|
108 | except socket.error: | |
|
109 | 109 | return False |
|
110 | 110 | sock.close() |
|
111 | 111 | os.unlink(name) |
@@ -5,7 +5,6 b' run pyflakes on all tracked files ending' | |||
|
5 | 5 | (skipping binary file random-seed) |
|
6 | 6 | $ hg manifest 2>/dev/null | egrep "\.py$|^[^.]*$" | grep -v /random_seed$ \ |
|
7 | 7 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
|
8 | contrib/simplemerge:*: 'os' imported but unused (glob) | |
|
9 | 8 | contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob) |
|
10 | 9 | setup.py:*: 'sha' imported but unused (glob) |
|
11 | 10 | setup.py:*: 'zlib' imported but unused (glob) |
@@ -16,14 +15,6 b' run pyflakes on all tracked files ending' | |||
|
16 | 15 | tests/hghave.py:*: 'publish_cmdline' imported but unused (glob) |
|
17 | 16 | tests/hghave.py:*: 'pygments' imported but unused (glob) |
|
18 | 17 | tests/hghave.py:*: 'ssl' imported but unused (glob) |
|
19 | contrib/casesmash.py:*: local variable 'inst' is assigned to but never used (glob) | |
|
20 | contrib/check-code.py:*: local variable 'po' is assigned to but never used (glob) | |
|
21 | contrib/hgfixes/fix_leftover_imports.py:*: local variable 'bare_names' is assigned to but never used (glob) | |
|
22 | contrib/perf.py:*: local variable 'm' is assigned to but never used (glob) | |
|
23 | contrib/perf.py:*: local variable 'c' is assigned to but never used (glob) | |
|
24 | doc/hgmanpage.py:*: local variable 'backref_text' is assigned to but never used (glob) | |
|
25 | tests/hghave.py:*: local variable 'err' is assigned to but never used (glob) | |
|
26 | tests/test-hgweb-auth.py:*: local variable 'e' is assigned to but never used (glob) | |
|
27 | 18 | contrib/win32/hgwebdir_wsgi.py:*: 'from isapi.install import *' used; unable to detect undefined names (glob) |
|
28 | 19 | hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob) |
|
29 | 20 |
General Comments 0
You need to be logged in to leave comments.
Login now