Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.py @ 45957:89a2afe31e82
formating: upgrade to black 20.8b1
This required a couple of small tweaks to un-confuse black, but now it
works. Big formatting changes come from:
* Dramatically improved collection-splitting logic upstream
* Black having a strong (correct IMO) opinion that """ is better than '''
Differential Revision: https://phab.mercurial-scm.org/D9430
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 27 Nov 2020 17:03:29 -0500 |
parents | 1441f4d57083 |
children | c26cb33e5219 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Fri Nov 27 17:00:00 2020 -0500 +++ b/mercurial/dispatch.py Fri Nov 27 17:03:29 2020 -0500 @@ -519,10 +519,10 @@ def aliasinterpolate(name, args, cmd): - '''interpolate args into cmd for shell aliases + """interpolate args into cmd for shell aliases This also handles $0, $@ and "$@". - ''' + """ # util.interpolate can't deal with "$@" (with quotes) because it's only # built to match prefix + patterns. replacemap = {b'$%d' % (i + 1): arg for i, arg in enumerate(args)} @@ -630,12 +630,18 @@ except error.UnknownCommand: self.badalias = _( b"alias '%s' resolves to unknown command '%s'" - ) % (self.name, cmd,) + ) % ( + self.name, + cmd, + ) self.unknowncmd = True except error.AmbiguousCommand: self.badalias = _( b"alias '%s' resolves to ambiguous command '%s'" - ) % (self.name, cmd,) + ) % ( + self.name, + cmd, + ) def _populatehelp(self, ui, name, cmd, fn, defaulthelp=None): # confine strings to be passed to i18n.gettext()