changeset 51862:607e94e01851

format: add many "missing" comma Black was not adding them until the next changeset introduced a bunch of `from __future__ import annotations` to most file. Since it make the next changeset hard to read we introduce them in advance.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 16 Sep 2024 15:36:38 +0200
parents f81e0ce5103a
children f4733654f144
files hgext/fix.py hgext/fsmonitor/__init__.py hgext/fsmonitor/pywatchman/__init__.py hgext/largefiles/overrides.py hgext/lfs/wrapper.py hgext/narrow/narrowbundle2.py hgext/notify.py hgext/record.py hgext/remotefilelog/__init__.py hgext/remotefilelog/remotefilectx.py mercurial/bundle2.py mercurial/changegroup.py mercurial/commands.py mercurial/dispatch.py mercurial/exchange.py mercurial/help.py mercurial/hgweb/webcommands.py mercurial/hgweb/webutil.py mercurial/keepalive.py mercurial/metadata.py mercurial/shelve.py mercurial/url.py
diffstat 22 files changed, 41 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/fix.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/fix.py	Mon Sep 16 15:36:38 2024 +0200
@@ -339,7 +339,7 @@
                     repo.hook(
                         b'postfixfile',
                         throw=False,
-                        **pycompat.strkwargs(hookargs)
+                        **pycompat.strkwargs(hookargs),
                     )
                 numitems[rev] -= 1
                 # Apply the fixes for this and any other revisions that are
--- a/hgext/fsmonitor/__init__.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/fsmonitor/__init__.py	Mon Sep 16 15:36:38 2024 +0200
@@ -891,7 +891,7 @@
     mergeancestor=False,
     labels=None,
     matcher=None,
-    **kwargs
+    **kwargs,
 ):
     distance = 0
     partial = True
@@ -918,7 +918,7 @@
             mergeancestor,
             labels,
             matcher,
-            **kwargs
+            **kwargs,
         )
 
 
--- a/hgext/fsmonitor/pywatchman/__init__.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/fsmonitor/pywatchman/__init__.py	Mon Sep 16 15:36:38 2024 +0200
@@ -805,7 +805,7 @@
             cmd = bser.dumps(
                 *args,
                 version=self.bser_version,
-                capabilities=self.bser_capabilities
+                capabilities=self.bser_capabilities,
             )
         else:
             cmd = bser.dumps(*args)
--- a/hgext/largefiles/overrides.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/largefiles/overrides.py	Mon Sep 16 15:36:38 2024 +0200
@@ -1657,7 +1657,7 @@
             m,
             uipathfn,
             opts.get(b'dry_run'),
-            **pycompat.strkwargs(opts)
+            **pycompat.strkwargs(opts),
         )
     # Call into the normal add code, and any files that *should* be added as
     # largefiles will be
--- a/hgext/lfs/wrapper.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/lfs/wrapper.py	Mon Sep 16 15:36:38 2024 +0200
@@ -169,7 +169,7 @@
     cachedelta=None,
     node=None,
     flags=revlog.REVIDX_DEFAULT_FLAGS,
-    **kwds
+    **kwds,
 ):
     # The matcher isn't available if reposetup() wasn't called.
     lfstrack = self._revlog.opener.options.get(b'lfstrack')
@@ -194,7 +194,7 @@
         cachedelta=cachedelta,
         node=node,
         flags=flags,
-        **kwds
+        **kwds,
     )
 
 
--- a/hgext/narrow/narrowbundle2.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/narrow/narrowbundle2.py	Mon Sep 16 15:36:38 2024 +0200
@@ -47,7 +47,7 @@
     b2caps=None,
     heads=None,
     common=None,
-    **kwargs
+    **kwargs,
 ):
     assert repo.ui.configbool(b'experimental', b'narrowservebrokenellipses')
 
--- a/hgext/notify.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/notify.py	Mon Sep 16 15:36:38 2024 +0200
@@ -416,7 +416,7 @@
             baseurl=self.ui.config(b'web', b'baseurl'),
             root=self.repo.root,
             webroot=self.root,
-            **props
+            **props,
         )
         return True
 
--- a/hgext/record.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/record.py	Mon Sep 16 15:36:38 2024 +0200
@@ -136,7 +136,7 @@
             False,
             cmdutil.recordfilter,
             *pats,
-            **opts
+            **opts,
         )
 
 
--- a/hgext/remotefilelog/__init__.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/remotefilelog/__init__.py	Mon Sep 16 15:36:38 2024 +0200
@@ -619,7 +619,7 @@
     copy,
     getfilectx,
     *args,
-    **kwargs
+    **kwargs,
 ):
     if isenabled(repo):
         prefetch = []
@@ -648,7 +648,7 @@
         copy,
         getfilectx,
         *args,
-        **kwargs
+        **kwargs,
     )
 
 
--- a/hgext/remotefilelog/remotefilectx.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/hgext/remotefilelog/remotefilectx.py	Mon Sep 16 15:36:38 2024 +0200
@@ -351,7 +351,7 @@
                 b'linkrevfixup',
                 logmsg + b'\n',
                 elapsed=elapsed * 1000,
-                **commonlogkwargs
+                **commonlogkwargs,
             )
 
     def _verifylinknode(self, revs, linknode):
--- a/mercurial/bundle2.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/bundle2.py	Mon Sep 16 15:36:38 2024 +0200
@@ -2116,7 +2116,7 @@
         op.source,
         b'bundle2',
         expectedtotal=nbchangesets,
-        **extrakwargs
+        **extrakwargs,
     )
     if op.reply is not None:
         # This is definitely not the final form of this
--- a/mercurial/changegroup.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/changegroup.py	Mon Sep 16 15:36:38 2024 +0200
@@ -697,7 +697,7 @@
                 repo.hook(
                     b'pretxnchangegroup',
                     throw=True,
-                    **pycompat.strkwargs(hookargs)
+                    **pycompat.strkwargs(hookargs),
                 )
 
             added = range(clstart, clend)
--- a/mercurial/commands.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/commands.py	Mon Sep 16 15:36:38 2024 +0200
@@ -3919,7 +3919,7 @@
     branch=None,
     tags=None,
     bookmarks=None,
-    **opts
+    **opts,
 ):
     """identify the working directory or specified revision
 
--- a/mercurial/dispatch.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/dispatch.py	Mon Sep 16 15:36:38 2024 +0200
@@ -300,7 +300,7 @@
                 req.ui.log(
                     b'uiblocked',
                     b'ui blocked ms\n',
-                    **pycompat.strkwargs(req.ui._blockedtimes)
+                    **pycompat.strkwargs(req.ui._blockedtimes),
                 )
             return_code = ret & 255
             req.ui.log(
--- a/mercurial/exchange.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/exchange.py	Mon Sep 16 15:36:38 2024 +0200
@@ -449,7 +449,7 @@
         newbranch,
         bookmarks,
         publish,
-        **pycompat.strkwargs(opargs)
+        **pycompat.strkwargs(opargs),
     )
     if pushop.remote.local():
         missing = (
@@ -1717,7 +1717,7 @@
         includepats=includepats,
         excludepats=excludepats,
         depth=depth,
-        **pycompat.strkwargs(opargs)
+        **pycompat.strkwargs(opargs),
     )
 
     peerlocal = pullop.remote.local()
@@ -2420,7 +2420,7 @@
     common=None,
     bundlecaps=None,
     remote_sidedata=None,
-    **kwargs
+    **kwargs,
 ):
     """Return chunks constituting a bundle's raw data.
 
@@ -2480,7 +2480,7 @@
             bundlecaps=bundlecaps,
             b2caps=b2caps,
             remote_sidedata=remote_sidedata,
-            **pycompat.strkwargs(kwargs)
+            **pycompat.strkwargs(kwargs),
         )
 
     info[b'prefercompressed'] = bundler.prefercompressed
@@ -2503,7 +2503,7 @@
     heads=None,
     common=None,
     remote_sidedata=None,
-    **kwargs
+    **kwargs,
 ):
     """add a changegroup part to the requested bundle"""
     if not kwargs.get('cg', True) or not b2caps:
@@ -2669,7 +2669,7 @@
     b2caps=None,
     heads=None,
     common=None,
-    **kwargs
+    **kwargs,
 ):
     """Transfer the .hgtags filenodes mapping.
 
@@ -2697,7 +2697,7 @@
     b2caps=None,
     heads=None,
     common=None,
-    **kwargs
+    **kwargs,
 ):
     """Transfer the rev-branch-cache mapping
 
--- a/mercurial/help.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/help.py	Mon Sep 16 15:36:38 2024 +0200
@@ -805,7 +805,7 @@
     full: bool = True,
     subtopic: Optional[bytes] = None,
     fullname: Optional[bytes] = None,
-    **opts
+    **opts,
 ) -> bytes:
     """
     Generate the help for 'name' as unformatted restructured text. If
@@ -1228,7 +1228,7 @@
     keep: Optional[Iterable[bytes]] = None,
     unknowncmd: bool = False,
     full: bool = True,
-    **opts
+    **opts,
 ) -> bytes:
     """get help for a given topic (as a dotted name) as rendered rst
 
@@ -1261,7 +1261,7 @@
         subtopic=subtopic,
         unknowncmd=unknowncmd,
         full=full,
-        **opts
+        **opts,
     )
 
     blocks, pruned = minirst.parse(text, keep=keep)
--- a/mercurial/hgweb/webcommands.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/hgweb/webcommands.py	Mon Sep 16 15:36:38 2024 +0200
@@ -174,7 +174,7 @@
         rename=webutil.renamelink(fctx),
         permissions=fctx.manifest().flags(f),
         ishead=int(ishead),
-        **pycompat.strkwargs(webutil.commonentry(web.repo, fctx))
+        **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)),
     )
 
 
@@ -628,7 +628,7 @@
         fentries=templateutil.mappinggenerator(filelist),
         dentries=templateutil.mappinggenerator(dirlist),
         archives=web.archivelist(hex(node)),
-        **pycompat.strkwargs(webutil.commonentry(web.repo, ctx))
+        **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)),
     )
 
 
@@ -873,7 +873,7 @@
         symrev=webutil.symrevorshortnode(web.req, ctx),
         rename=rename,
         diff=diffs,
-        **pycompat.strkwargs(webutil.commonentry(web.repo, ctx))
+        **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)),
     )
 
 
@@ -954,7 +954,7 @@
         rightrev=rightrev,
         rightnode=hex(rightnode),
         comparison=comparison,
-        **pycompat.strkwargs(webutil.commonentry(web.repo, ctx))
+        **pycompat.strkwargs(webutil.commonentry(web.repo, ctx)),
     )
 
 
@@ -1061,7 +1061,7 @@
         permissions=fctx.manifest().flags(f),
         ishead=int(ishead),
         diffopts=templateutil.hybriddict(diffopts),
-        **pycompat.strkwargs(webutil.commonentry(web.repo, fctx))
+        **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)),
     )
 
 
@@ -1224,7 +1224,7 @@
         revcount=revcount,
         morevars=morevars,
         lessvars=lessvars,
-        **pycompat.strkwargs(webutil.commonentry(web.repo, fctx))
+        **pycompat.strkwargs(webutil.commonentry(web.repo, fctx)),
     )
 
 
--- a/mercurial/hgweb/webutil.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/hgweb/webutil.py	Mon Sep 16 15:36:38 2024 +0200
@@ -600,7 +600,7 @@
         diffsummary=lambda context, mapping: diffsummary(diffstatsgen),
         diffstat=diffstats,
         archives=web.archivelist(ctx.hex()),
-        **pycompat.strkwargs(commonentry(web.repo, ctx))
+        **pycompat.strkwargs(commonentry(web.repo, ctx)),
     )
 
 
--- a/mercurial/keepalive.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/keepalive.py	Mon Sep 16 15:36:38 2024 +0200
@@ -339,7 +339,7 @@
                 h.putrequest(
                     req.get_method(),
                     urllibcompat.getselector(req),
-                    **skipheaders
+                    **skipheaders,
                 )
                 if 'content-type' not in headers:
                     h.putheader(
@@ -351,7 +351,7 @@
                 h.putrequest(
                     req.get_method(),
                     urllibcompat.getselector(req),
-                    **skipheaders
+                    **skipheaders,
                 )
         except socket.error as err:
             raise urlerr.urlerror(err)
--- a/mercurial/metadata.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/metadata.py	Mon Sep 16 15:36:38 2024 +0200
@@ -7,6 +7,8 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
+from __future__ import annotations
+
 import multiprocessing
 import struct
 
--- a/mercurial/shelve.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/shelve.py	Mon Sep 16 15:36:38 2024 +0200
@@ -673,7 +673,7 @@
                 False,
                 cmdutil.recordfilter,
                 *pats,
-                **pycompat.strkwargs(opts)
+                **pycompat.strkwargs(opts),
             )
         if not node:
             _nothingtoshelvemessaging(ui, repo, pats, opts)
@@ -1050,7 +1050,7 @@
         False,
         cmdutil.recordfilter,
         *pats,
-        **pycompat.strkwargs(opts)
+        **pycompat.strkwargs(opts),
     )
     snode = repo.commit(
         text=shelvectx.description(),
--- a/mercurial/url.py	Thu Sep 12 12:53:00 2024 -0400
+++ b/mercurial/url.py	Mon Sep 16 15:36:38 2024 +0200
@@ -312,7 +312,7 @@
             key_file=None,
             cert_file=None,
             *args,
-            **kwargs
+            **kwargs,
         ):
             keepalive.HTTPConnection.__init__(self, host, port, *args, **kwargs)
             self.key_file = key_file