[PATCH 6 of 7] drop enumerate() when index is not used
Peter Arrenbrecht
peter.arrenbrecht at gmail.com
Wed Mar 11 11:43:13 CDT 2009
# HG changeset patch
# User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
# Date 1236789722 -3600
drop enumerate() when index is not used
diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -68,7 +68,7 @@
def loadall(ui):
result = ui.configitems("extensions")
- for i, (name, path) in enumerate(result):
+ for (name, path) in result:
if path:
if path[0] == '!':
continue
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -642,7 +642,7 @@
tree = list(graphmod.graph(web.repo, rev, downrev))
canvasheight = (len(tree) + 1) * bg_height - 27;
data = []
- for i, (ctx, vtx, edges) in enumerate(tree):
+ for (ctx, vtx, edges) in tree:
node = short(ctx.node())
age = templatefilters.age(ctx.date())
desc = templatefilters.firstline(ctx.description())
More information about the Mercurial-devel
mailing list