Patchwork [1,of,2,BLACKGNAROCK-V2] formatting: run black on all file again

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 7, 2019, 6:14 p.m.
Message ID <3c5fc04c5cbc3b146105.1570472094@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/42068/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 7, 2019, 6:14 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1570460331 14400
#      Mon Oct 07 10:58:51 2019 -0400
# Node ID 3c5fc04c5cbc3b146105b0e6764634c77067dbd5
# Parent  9002f4a3dde63518d1467f3934a1fe226f3b2297
# EXP-Topic blackgnarok-bytemageddon
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 3c5fc04c5cbc
formatting: run black on all file again

Apparently, since the blackgnarok, we divergence from the expected formatting.

Formatted using::

  grey.py -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/** - contrib/grey.py')

# skip-blame mass-reformatting only

# no-check-commit reformats foo_bar functions

Patch

diff --git a/doc/check-seclevel.py b/doc/check-seclevel.py
--- a/doc/check-seclevel.py
+++ b/doc/check-seclevel.py
@@ -70,7 +70,9 @@  def checkseclevel(ui, doc, name, initlev
             continue
         nextlevel = mark2level[mark]
         if curlevel < nextlevel and curlevel + 1 != nextlevel:
-            ui.warnnoi18n('gap of section level at "%s" of %s\n' % (title, name))
+            ui.warnnoi18n(
+                'gap of section level at "%s" of %s\n' % (title, name)
+            )
             showavailables(ui, initlevel)
             errorcnt += 1
             continue
@@ -88,7 +90,9 @@  def checkcmdtable(ui, cmdtable, namefmt,
     for k, entry in cmdtable.items():
         name = k.split(b"|")[0].lstrip(b"^")
         if not entry[0].__doc__:
-            ui.notenoi18n('skip checking %s: no help document\n' % (namefmt % name))
+            ui.notenoi18n(
+                'skip checking %s: no help document\n' % (namefmt % name)
+            )
             continue
         errorcnt += checkseclevel(
             ui, entry[0].__doc__, namefmt % name, initlevel
@@ -113,7 +117,9 @@  def checkhghelps(ui):
     ):
         mod = extensions.load(ui, name, None)
         if not mod.__doc__:
-            ui.notenoi18n('skip checking %s extension: no help document\n' % name)
+            ui.notenoi18n(
+                'skip checking %s extension: no help document\n' % name
+            )
             continue
         errorcnt += checkseclevel(
             ui, mod.__doc__, '%s extension' % name, initlevel_ext
diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -775,7 +775,9 @@  def phabsend(ui, repo, *revs, **opts):
                     try:
                         writediffproperties(unfi[newnode], diffmap[old.node()])
                     except util.urlerr.urlerror:
-                        ui.warnnoi18n(b'Failed to update metadata for D%s\n' % drevid)
+                        ui.warnnoi18n(
+                            b'Failed to update metadata for D%s\n' % drevid
+                        )
                 # Remove local tags since it's no longer necessary
                 tagname = b'D%d' % drevid
                 if tagname in repo.tags():
diff --git a/hgext/win32mbcs.py b/hgext/win32mbcs.py
--- a/hgext/win32mbcs.py
+++ b/hgext/win32mbcs.py
@@ -216,4 +216,6 @@  def extsetup(ui):
         # command line options is not yet applied when
         # extensions.loadall() is called.
         if b'--debug' in sys.argv:
-            ui.writenoi18n(b"[win32mbcs] activated with encoding: %s\n" % _encoding)
+            ui.writenoi18n(
+                b"[win32mbcs] activated with encoding: %s\n" % _encoding
+            )
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1250,11 +1250,17 @@  def debugformat(ui, repo, **opts):
 def debugfsinfo(ui, path=b"."):
     """show information detected about current filesystem"""
     ui.writenoi18n(b'path: %s\n' % path)
-    ui.writenoi18n(b'mounted on: %s\n' % (util.getfsmountpoint(path) or b'(unknown)'))
+    ui.writenoi18n(
+        b'mounted on: %s\n' % (util.getfsmountpoint(path) or b'(unknown)')
+    )
     ui.writenoi18n(b'exec: %s\n' % (util.checkexec(path) and b'yes' or b'no'))
     ui.writenoi18n(b'fstype: %s\n' % (util.getfstype(path) or b'(unknown)'))
-    ui.writenoi18n(b'symlink: %s\n' % (util.checklink(path) and b'yes' or b'no'))
-    ui.writenoi18n(b'hardlink: %s\n' % (util.checknlink(path) and b'yes' or b'no'))
+    ui.writenoi18n(
+        b'symlink: %s\n' % (util.checklink(path) and b'yes' or b'no')
+    )
+    ui.writenoi18n(
+        b'hardlink: %s\n' % (util.checknlink(path) and b'yes' or b'no')
+    )
     casesensitive = b'(unknown)'
     try:
         with pycompat.namedtempfile(prefix=b'.debugfsinfo', dir=path) as f:
@@ -1938,7 +1944,9 @@  def debugmergestate(ui, repo, *args):
                 ui.writenoi18n(b'other: %s\n' % record)
             elif rtype == b'm':
                 driver, mdstate = record.split(b'\0', 1)
-                ui.writenoi18n(b'merge driver: %s (state "%s")\n' % (driver, mdstate))
+                ui.writenoi18n(
+                    b'merge driver: %s (state "%s")\n' % (driver, mdstate)
+                )
             elif rtype in b'FDC':
                 r = record.split(b'\0')
                 f, state, hash, lfile, afile, anode, ofile = r[0:7]
@@ -1951,7 +1959,9 @@  def debugmergestate(ui, repo, *args):
                     b'file: %s (record type "%s", state "%s", hash %s)\n'
                     % (f, rtype, state, _hashornull(hash))
                 )
-                ui.writenoi18n(b'  local path: %s (flags "%s")\n' % (lfile, flags))
+                ui.writenoi18n(
+                    b'  local path: %s (flags "%s")\n' % (lfile, flags)
+                )
                 ui.writenoi18n(
                     b'  ancestor path: %s (node %s)\n'
                     % (afile, _hashornull(anode))
@@ -2797,7 +2807,9 @@  def debugrevlog(ui, repo, file_=None, **
     fmt2 = dfmtstr(totalsize)
     ui.writenoi18n(b'revisions     : ' + fmt2 % numrevs)
     ui.writenoi18n(b'    merges    : ' + fmt % pcfmt(nummerges, numrevs))
-    ui.writenoi18n(b'    normal    : ' + fmt % pcfmt(numrevs - nummerges, numrevs))
+    ui.writenoi18n(
+        b'    normal    : ' + fmt % pcfmt(numrevs - nummerges, numrevs)
+    )
     ui.writenoi18n(b'revisions     : ' + fmt2 % numrevs)
     ui.writenoi18n(b'    empty     : ' + fmt % pcfmt(numempty, numrevs))
     ui.writenoi18n(
@@ -2808,7 +2820,9 @@  def debugrevlog(ui, repo, file_=None, **
         b'                   delta : '
         + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta)
     )
-    ui.writenoi18n(b'    snapshot  : ' + fmt % pcfmt(numfull + numsemi, numrevs))
+    ui.writenoi18n(
+        b'    snapshot  : ' + fmt % pcfmt(numfull + numsemi, numrevs)
+    )
     for depth in sorted(numsnapdepth):
         ui.write(
             (b'      lvl-%-3d :       ' % depth)
@@ -2881,7 +2895,9 @@  def debugrevlog(ui, repo, file_=None, **
         ui.write(b'\n')
         fmt = pcfmtstr(numdeltas)
         fmt2 = pcfmtstr(numdeltas, 4)
-        ui.writenoi18n(b'deltas against prev  : ' + fmt % pcfmt(numprev, numdeltas))
+        ui.writenoi18n(
+            b'deltas against prev  : ' + fmt % pcfmt(numprev, numdeltas)
+        )
         if numprev > 0:
             ui.writenoi18n(
                 b'    where prev = p1  : ' + fmt2 % pcfmt(nump1prev, numprev)
@@ -2893,8 +2909,12 @@  def debugrevlog(ui, repo, file_=None, **
                 b'    other            : ' + fmt2 % pcfmt(numoprev, numprev)
             )
         if gdelta:
-            ui.writenoi18n(b'deltas against p1    : ' + fmt % pcfmt(nump1, numdeltas))
-            ui.writenoi18n(b'deltas against p2    : ' + fmt % pcfmt(nump2, numdeltas))
+            ui.writenoi18n(
+                b'deltas against p1    : ' + fmt % pcfmt(nump1, numdeltas)
+            )
+            ui.writenoi18n(
+                b'deltas against p2    : ' + fmt % pcfmt(nump2, numdeltas)
+            )
             ui.writenoi18n(
                 b'deltas against other : ' + fmt % pcfmt(numother, numdeltas)
             )
@@ -3113,8 +3133,12 @@  def debugrevspec(ui, repo, expr, **opts)
         arevs = revset.makematcher(treebystage[b'analyzed'])(repo)
         brevs = revset.makematcher(treebystage[b'optimized'])(repo)
         if opts[b'show_set'] or (opts[b'show_set'] is None and ui.verbose):
-            ui.writenoi18n(b"* analyzed set:\n", stringutil.prettyrepr(arevs), b"\n")
-            ui.writenoi18n(b"* optimized set:\n", stringutil.prettyrepr(brevs), b"\n")
+            ui.writenoi18n(
+                b"* analyzed set:\n", stringutil.prettyrepr(arevs), b"\n"
+            )
+            ui.writenoi18n(
+                b"* optimized set:\n", stringutil.prettyrepr(brevs), b"\n"
+            )
         arevs = list(arevs)
         brevs = list(brevs)
         if arevs == brevs:
@@ -3418,7 +3442,9 @@  def debugtemplate(ui, repo, tmpl, **opts
         ui.note(templater.prettyformat(tree), b'\n')
         newtree = templater.expandaliases(tree, aliases)
         if newtree != tree:
-            ui.notenoi18n(b"* expanded:\n", templater.prettyformat(newtree), b'\n')
+            ui.notenoi18n(
+                b"* expanded:\n", templater.prettyformat(newtree), b'\n'
+            )
 
     if revs is None:
         tres = formatter.templateresources(ui, repo)
diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -367,7 +367,9 @@  def obfuscate(text):
     """Any text. Returns the input text rendered as a sequence of
     XML entities.
     """
-    text = pycompat.unicode(text, pycompat.sysstr(encoding.encoding), r'replace')
+    text = pycompat.unicode(
+        text, pycompat.sysstr(encoding.encoding), r'replace'
+    )
     return b''.join([b'&#%d;' % ord(c) for c in text])