##// END OF EJS Templates
cleanup: remove unnecessary list constructor calls around list comprehensions
Manuel Jacob -
r52263:0d414fb8 default
parent child Browse files
Show More
@@ -111,7 +111,7 b' def parseoptions(ui, cmdoptions, args):'
111
111
112 ui.warn(_(b"ignoring unknown option %s\n") % flag)
112 ui.warn(_(b"ignoring unknown option %s\n") % flag)
113
113
114 args = list([convert(x) for x in args])
114 args = [convert(x) for x in args]
115 opts = dict(
115 opts = dict(
116 [
116 [
117 (k, convert(v)) if isinstance(v, bytes) else (k, v)
117 (k, convert(v)) if isinstance(v, bytes) else (k, v)
@@ -583,7 +583,7 b' def runcommand(orig, lui, repo, *args, *'
583 # prevent strip from stripping remotefilelogs
583 # prevent strip from stripping remotefilelogs
584 def _collectbrokencsets(orig, repo, files, striprev):
584 def _collectbrokencsets(orig, repo, files, striprev):
585 if isenabled(repo):
585 if isenabled(repo):
586 files = list([f for f in files if not repo.shallowmatch(f)])
586 files = [f for f in files if not repo.shallowmatch(f)]
587 return orig(repo, files, striprev)
587 return orig(repo, files, striprev)
588
588
589
589
@@ -61,7 +61,7 b' def setupserver(ui, repo):'
61 repo.root, b'', None, includepattern, excludepattern
61 repo.root, b'', None, includepattern, excludepattern
62 )
62 )
63
63
64 changedfiles = list([f for f in changedfiles if not m(f)])
64 changedfiles = [f for f in changedfiles if not m(f)]
65 return orig(
65 return orig(
66 self, changedfiles, linknodes, commonrevs, source, *args, **kwargs
66 self, changedfiles, linknodes, commonrevs, source, *args, **kwargs
67 )
67 )
@@ -355,9 +355,7 b' def gethgversion():'
355 return _hgversion
355 return _hgversion
356
356
357
357
358 @checkvers(
358 @checkvers("hg", "Mercurial >= %s", [(1.0 * x) / 10 for x in range(9, 99)])
359 "hg", "Mercurial >= %s", list([(1.0 * x) / 10 for x in range(9, 99)])
360 )
361 def has_hg_range(v):
359 def has_hg_range(v):
362 major, minor = v.split('.')[0:2]
360 major, minor = v.split('.')[0:2]
363 return gethgversion() >= (int(major), int(minor))
361 return gethgversion() >= (int(major), int(minor))
General Comments 0
You need to be logged in to leave comments. Login now