mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
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.
This commit is contained in:
parent
1e4894d773
commit
4009f00b54
@ -722,7 +722,8 @@ class workingctx(changectx):
|
||||
|
||||
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):
|
||||
|
@ -86,7 +86,8 @@ def ignore(root, files, warn):
|
||||
(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
|
||||
|
||||
|
@ -1242,7 +1242,8 @@ class localrepository(repo.repository):
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user