diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -76,10 +76,9 @@ class gpg(object): fp = os.fdopen(fd, r'wb') fp.write(data) fp.close() - gpgcmd = b"%s --logger-fd 1 --status-fd 1 --verify \"%s\" \"%s\"" % ( - self.path, - sigfile, - datafile, + gpgcmd = ( + b"%s --logger-fd 1 --status-fd 1 --verify \"%s\" \"%s\"" + % (self.path, sigfile, datafile,) ) ret = procutil.filter(b"", gpgcmd) finally: diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -212,11 +212,9 @@ class config(object): def read(self, path, fp=None, sections=None, remap=None): if not fp: fp = util.posixfile(path, b'rb') - assert ( - getattr(fp, 'mode', r'rb') == r'rb' - ), b'config files must be opened in binary mode, got fp=%r mode=%r' % ( - fp, - fp.mode, + assert getattr(fp, 'mode', r'rb') == r'rb', ( + b'config files must be opened in binary mode, got fp=%r mode=%r' + % (fp, fp.mode,) ) self.parse( path, fp.read(), sections=sections, remap=remap, include=self.read diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1187,10 +1187,9 @@ class filectx(basefilectx): assert ( changeid is not None or fileid is not None or changectx is not None - ), b"bad args: changeid=%r, fileid=%r, changectx=%r" % ( - changeid, - fileid, - changectx, + ), ( + b"bad args: changeid=%r, fileid=%r, changectx=%r" + % (changeid, fileid, changectx,) ) if filelog is not None: diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -867,12 +867,15 @@ class treemanifest(object): return not self._dirs or all(m._isempty() for m in self._dirs.values()) def __repr__(self): - return b'' % ( - self._dir, - hex(self._node), - bool(self._loadfunc is _noop), - self._dirty, - id(self), + return ( + b'' + % ( + self._dir, + hex(self._node), + bool(self._loadfunc is _noop), + self._dirty, + id(self), + ) ) def dir(self): diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -3116,9 +3116,7 @@ class TestRunner(object): vlog("# Using HGTMP", _strpath(self._hgtmp)) vlog("# Using PATH", os.environ["PATH"]) vlog( - "# Using", - _strpath(IMPL_PATH), - _strpath(osenvironb[IMPL_PATH]), + "# Using", _strpath(IMPL_PATH), _strpath(osenvironb[IMPL_PATH]), ) vlog("# Writing to directory", _strpath(self._outputdir))