# HG changeset patch # User Martin Geisler # Date 1296725477 -3600 # Node ID 58c497d0e44db1f5bd0c5301effdb4e47dc3102c # Parent d4de90a612f7f0631046ef69e777c27d3e65e099 remove unnecessary list comprehensions These result lists were only built for the side effects, and so a normal loop is just as good and more straight-forward. diff -r d4de90a612f7 -r 58c497d0e44d mercurial/context.py --- a/mercurial/context.py Tue Feb 15 22:25:48 2011 +0100 +++ b/mercurial/context.py Thu Feb 03 10:31:17 2011 +0100 @@ -722,7 +722,8 @@ def tags(self): t = [] - [t.extend(p.tags()) for p in self.parents()] + for p in self.parents(): + t.extend(p.tags()) return t def children(self): diff -r d4de90a612f7 -r 58c497d0e44d mercurial/ignore.py --- a/mercurial/ignore.py Tue Feb 15 22:25:48 2011 +0100 +++ b/mercurial/ignore.py Thu Feb 03 10:31:17 2011 +0100 @@ -86,7 +86,8 @@ (f, inst.strerror)) allpats = [] - [allpats.extend(patlist) for patlist in pats.values()] + for patlist in pats.values(): + allpats.extend(patlist) if not allpats: return util.never diff -r d4de90a612f7 -r 58c497d0e44d mercurial/localrepo.py --- a/mercurial/localrepo.py Tue Feb 15 22:25:48 2011 +0100 +++ b/mercurial/localrepo.py Thu Feb 03 10:31:17 2011 +0100 @@ -1242,7 +1242,8 @@ self.ui.status(_("skipping missing subrepository: %s\n") % subpath) - [l.sort() for l in r] + for l in r: + l.sort() return r def heads(self, start=None):