pyupgrade: run the `unpack_list_comprehension` fixer
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 05 Jan 2025 22:12:02 -0500
changeset 52642 73ab542565e0
parent 52641 9bd6854aab86
child 52643 5cc8deb96b48
pyupgrade: run the `unpack_list_comprehension` fixer This probably doesn't matter much, but it reduces the noise when running the tool in the future.
hgext/convert/bzr.py
hgext/convert/hg.py
hgext/largefiles/overrides.py
mercurial/commands.py
mercurial/debugcommands.py
mercurial/dispatch.py
--- a/hgext/convert/bzr.py	Sun Jan 05 22:00:40 2025 -0500
+++ b/hgext/convert/bzr.py	Sun Jan 05 22:12:02 2025 -0500
@@ -332,7 +332,7 @@
                 changes.append((path, revid))
 
             # populate the mode cache
-            kind, executable = [e[1] for e in (kind, executable)]
+            kind, executable = (e[1] for e in (kind, executable))
             mode = (executable and b'x') or (kind == 'symlink' and b'l') or b''
             self._modecache[(topath, revid)] = mode
             changes.append((topath, revid))
--- a/hgext/convert/hg.py	Sun Jan 05 22:00:40 2025 -0500
+++ b/hgext/convert/hg.py	Sun Jan 05 22:12:02 2025 -0500
@@ -697,7 +697,7 @@
         else:
             i = i or 0
             ma, r = self._changedfiles(parents[i], ctx)
-        ma, r = [[f for f in l if f not in self.ignored] for l in (ma, r)]
+        ma, r = ([f for f in l if f not in self.ignored] for l in (ma, r))
 
         if i == 0:
             self._changescache = (rev, (ma, r))
--- a/hgext/largefiles/overrides.py	Sun Jan 05 22:00:40 2025 -0500
+++ b/hgext/largefiles/overrides.py	Sun Jan 05 22:12:02 2025 -0500
@@ -182,10 +182,10 @@
     with lfstatus(repo):
         s = repo.status(match=m, clean=not isaddremove)
     manifest = repo[None].manifest()
-    modified, added, deleted, clean = [
+    modified, added, deleted, clean = (
         [f for f in list if lfutil.standin(f) in manifest]
         for list in (s.modified, s.added, s.deleted, s.clean)
-    ]
+    )
 
     def warn(files, msg):
         for f in files:
--- a/mercurial/commands.py	Sun Jan 05 22:00:40 2025 -0500
+++ b/mercurial/commands.py	Sun Jan 05 22:12:02 2025 -0500
@@ -5788,7 +5788,7 @@
     opts = pycompat.byteskwargs(opts)
     confirm = ui.configbool(b'commands', b'resolve.confirm')
     flaglist = b'all mark unmark list no_status re_merge'.split()
-    all, mark, unmark, show, nostatus, remerge = [opts.get(o) for o in flaglist]
+    all, mark, unmark, show, nostatus, remerge = (opts.get(o) for o in flaglist)
 
     actioncount = len(list(filter(None, [show, mark, unmark, remerge])))
     if actioncount > 1:
--- a/mercurial/debugcommands.py	Sun Jan 05 22:00:40 2025 -0500
+++ b/mercurial/debugcommands.py	Sun Jan 05 22:12:02 2025 -0500
@@ -277,9 +277,9 @@
                     if len(ps) > 1:
                         p2 = repo[ps[1]]
                         pa = p1.ancestor(p2)
-                        base, local, other = [
+                        base, local, other = (
                             x[fn].data() for x in (pa, p1, p2)
-                        ]
+                        )
                         m3 = simplemerge.Merge3Text(
                             base,
                             local,
--- a/mercurial/dispatch.py	Sun Jan 05 22:00:40 2025 -0500
+++ b/mercurial/dispatch.py	Sun Jan 05 22:12:02 2025 -0500
@@ -846,7 +846,7 @@
 
     for cfg in config:
         try:
-            name, value = [cfgelem.strip() for cfgelem in cfg.split(b'=', 1)]
+            name, value = (cfgelem.strip() for cfgelem in cfg.split(b'=', 1))
             section, name = name.split(b'.', 1)
             if not section or not name:
                 raise IndexError