# HG changeset patch # User Benoit Boissinot # Date 1265639794 -3600 # Node ID 4612cded5176aad71a712fe8add54055843f4933 # Parent 217703f760d1c1ffc0007db01b01cb8da38ab956 fix coding style (reported by pylint) diff -r 217703f760d1 -r 4612cded5176 hgext/convert/bzr.py --- a/hgext/convert/bzr.py Mon Feb 08 15:06:26 2010 +0100 +++ b/hgext/convert/bzr.py Mon Feb 08 15:36:34 2010 +0100 @@ -170,7 +170,7 @@ return changes def _gettreechanges(self, current, origin): - revid = current._revision_id; + revid = current._revision_id changes = [] renames = {} for (fileid, paths, changed_content, versioned, parent, name, diff -r 217703f760d1 -r 4612cded5176 hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py Mon Feb 08 15:06:26 2010 +0100 +++ b/hgext/convert/gnuarch.py Mon Feb 08 15:36:34 2010 +0100 @@ -172,7 +172,7 @@ for src in self.changes[rev].ren_dirs: to = self.changes[rev].ren_dirs[src] - chgs, cps = self._rendirchanges(src, to); + chgs, cps = self._rendirchanges(src, to) changes += [(f, rev) for f in chgs] copies.update(cps) diff -r 217703f760d1 -r 4612cded5176 hgext/extdiff.py --- a/hgext/extdiff.py Mon Feb 08 15:06:26 2010 +0100 +++ b/hgext/extdiff.py Mon Feb 08 15:36:34 2010 +0100 @@ -126,7 +126,7 @@ modadd = mod_a | add_a | mod_b | add_b common = modadd | rem_a | rem_b if not common: - return 0 + return 0 tmproot = tempfile.mkdtemp(prefix='extdiff.') try: diff -r 217703f760d1 -r 4612cded5176 hgext/gpg.py --- a/hgext/gpg.py Mon Feb 08 15:06:26 2010 +0100 +++ b/hgext/gpg.py Mon Feb 08 15:36:34 2010 +0100 @@ -90,7 +90,7 @@ if not l: continue yield (l.split(" ", 2), (context, ln)) - ln +=1 + ln += 1 # read the heads fl = repo.file(".hgsigs") diff -r 217703f760d1 -r 4612cded5176 hgext/hgk.py --- a/hgext/hgk.py Mon Feb 08 15:06:26 2010 +0100 +++ b/hgext/hgk.py Mon Feb 08 15:36:34 2010 +0100 @@ -92,7 +92,7 @@ break def catcommit(ui, repo, n, prefix, ctx=None): - nlprefix = '\n' + prefix; + nlprefix = '\n' + prefix if ctx is None: ctx = repo[n] ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ?? @@ -135,7 +135,7 @@ prefix = "" if opts['stdin']: try: - (type, r) = raw_input().split(' '); + (type, r) = raw_input().split(' ') prefix = " " except EOFError: return @@ -148,12 +148,12 @@ while r: if type != "commit": ui.warn(_("aborting hg cat-file only understands commits\n")) - return 1; + return 1 n = repo.lookup(r) catcommit(ui, repo, n, prefix) if opts['stdin']: try: - (type, r) = raw_input().split(' '); + (type, r) = raw_input().split(' ') except EOFError: break else: @@ -220,8 +220,8 @@ # calculate the graph for the supplied commits for i, n in enumerate(want_sha1): - reachable.append(set()); - visit = [n]; + reachable.append(set()) + visit = [n] reachable[i].add(n) while visit: n = visit.pop(0) diff -r 217703f760d1 -r 4612cded5176 hgext/highlight/highlight.py --- a/hgext/highlight/highlight.py Mon Feb 08 15:06:26 2010 +0100 +++ b/hgext/highlight/highlight.py Mon Feb 08 15:36:34 2010 +0100 @@ -9,7 +9,7 @@ # file to defer pygments loading and speedup extension setup. from mercurial import demandimport -demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__',]) +demandimport.ignore.extend(['pkgutil', 'pkg_resources', '__main__']) from mercurial import util, encoding from pygments import highlight diff -r 217703f760d1 -r 4612cded5176 hgext/transplant.py --- a/hgext/transplant.py Mon Feb 08 15:06:26 2010 +0100 +++ b/hgext/transplant.py Mon Feb 08 15:36:34 2010 +0100 @@ -552,7 +552,7 @@ tp.resume(repo, source, opts) return - tf=tp.transplantfilter(repo, source, p1) + tf = tp.transplantfilter(repo, source, p1) if opts.get('prune'): prune = [source.lookup(r) for r in cmdutil.revrange(source, opts.get('prune'))] diff -r 217703f760d1 -r 4612cded5176 mercurial/commands.py --- a/mercurial/commands.py Mon Feb 08 15:06:26 2010 +0100 +++ b/mercurial/commands.py Mon Feb 08 15:36:34 2010 +0100 @@ -103,7 +103,7 @@ opts['number'] = 1 linenumber = opts.get('line_number') is not None - if (linenumber and (not opts.get('changeset')) and (not opts.get('number'))): + if linenumber and (not opts.get('changeset')) and (not opts.get('number')): raise util.Abort(_('at least one of -n/-c is required for -l')) funcmap = [func for op, func in opmap if opts.get(op)] diff -r 217703f760d1 -r 4612cded5176 mercurial/dirstate.py --- a/mercurial/dirstate.py Mon Feb 08 15:06:26 2010 +0100 +++ b/mercurial/dirstate.py Mon Feb 08 15:36:34 2010 +0100 @@ -366,7 +366,7 @@ def clear(self): self._map = {} if "_dirs" in self.__dict__: - delattr(self, "_dirs"); + delattr(self, "_dirs") self._copymap = {} self._pl = [nullid, nullid] self._dirty = True diff -r 217703f760d1 -r 4612cded5176 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Mon Feb 08 15:06:26 2010 +0100 +++ b/mercurial/hgweb/hgwebdir_mod.py Mon Feb 08 15:36:34 2010 +0100 @@ -10,7 +10,7 @@ from mercurial.i18n import _ from mercurial import ui, hg, util, templater from mercurial import error, encoding -from common import ErrorResponse, get_mtime, staticfile, paritygen,\ +from common import ErrorResponse, get_mtime, staticfile, paritygen, \ get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR from hgweb_mod import hgweb from request import wsgirequest diff -r 217703f760d1 -r 4612cded5176 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Mon Feb 08 15:06:26 2010 +0100 +++ b/mercurial/hgweb/webcommands.py Mon Feb 08 15:36:34 2010 +0100 @@ -707,7 +707,7 @@ dag = graphmod.revisions(web.repo, rev, downrev) tree = list(graphmod.colored(dag)) - canvasheight = (len(tree) + 1) * bg_height - 27; + canvasheight = (len(tree) + 1) * bg_height - 27 data = [] for (id, type, ctx, vtx, edges) in tree: if type != graphmod.CHANGESET: diff -r 217703f760d1 -r 4612cded5176 mercurial/keepalive.py --- a/mercurial/keepalive.py Mon Feb 08 15:06:26 2010 +0100 +++ b/mercurial/keepalive.py Mon Feb 08 15:36:34 2010 +0100 @@ -550,10 +550,10 @@ if hasattr(str,'read') : if self.debuglevel > 0: print "sendIng a read()able" - data=str.read(blocksize) + data = str.read(blocksize) while data: self.sock.sendall(data) - data=str.read(blocksize) + data = str.read(blocksize) else: self.sock.sendall(str) except socket.error, v: diff -r 217703f760d1 -r 4612cded5176 mercurial/templatekw.py --- a/mercurial/templatekw.py Mon Feb 08 15:06:26 2010 +0100 +++ b/mercurial/templatekw.py Mon Feb 08 15:36:34 2010 +0100 @@ -178,7 +178,7 @@ return showlist('file_add', getfiles(repo, ctx, revcache)[1], **args) def showfilecopies(**args): - cache, ctx= args['cache'], args['ctx'] + cache, ctx = args['cache'], args['ctx'] copies = args['revcache'].get('copies') if copies is None: if 'getrenamed' not in cache: diff -r 217703f760d1 -r 4612cded5176 mercurial/windows.py --- a/mercurial/windows.py Mon Feb 08 15:06:26 2010 +0100 +++ b/mercurial/windows.py Mon Feb 08 15:36:34 2010 +0100 @@ -41,7 +41,7 @@ limit = 16000 l = len(s) start = 0 - self.softspace = 0; + self.softspace = 0 while start < l: end = start + limit self.fp.write(s[start:end]) @@ -217,7 +217,6 @@ '''Stat each file in files and yield stat or None if file does not exist. Cluster and cache stat per directory to minimize number of OS stat calls.''' ncase = os.path.normcase - sep = os.sep dircache = {} # dirname -> filename -> status | None if file does not exist for nf in files: nf = ncase(nf)