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
--- a/doc/check-seclevel.py Mon Oct 07 11:51:34 2019 -0400
+++ b/doc/check-seclevel.py Mon Oct 07 10:58:51 2019 -0400
@@ -70,7 +70,9 @@
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 @@
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 @@
):
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
--- a/hgext/phabricator.py Mon Oct 07 11:51:34 2019 -0400
+++ b/hgext/phabricator.py Mon Oct 07 10:58:51 2019 -0400
@@ -775,7 +775,9 @@
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():
--- a/hgext/win32mbcs.py Mon Oct 07 11:51:34 2019 -0400
+++ b/hgext/win32mbcs.py Mon Oct 07 10:58:51 2019 -0400
@@ -216,4 +216,6 @@
# 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
+ )
--- a/mercurial/debugcommands.py Mon Oct 07 11:51:34 2019 -0400
+++ b/mercurial/debugcommands.py Mon Oct 07 10:58:51 2019 -0400
@@ -1250,11 +1250,17 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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)
--- a/mercurial/templatefilters.py Mon Oct 07 11:51:34 2019 -0400
+++ b/mercurial/templatefilters.py Mon Oct 07 10:58:51 2019 -0400
@@ -367,7 +367,9 @@
"""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])