Mercurial > hg
diff tests/logexceptions.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | 8de90e006c78 |
children | d4ba4d51f85f |
line wrap: on
line diff
--- a/tests/logexceptions.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/logexceptions.py Sun Oct 06 09:45:02 2019 -0400 @@ -18,14 +18,16 @@ extensions, ) + def handleexception(orig, ui): res = orig(ui) if not ui.environ.get(b'HGEXCEPTIONSDIR'): return res - dest = os.path.join(ui.environ[b'HGEXCEPTIONSDIR'], - str(uuid.uuid4()).encode('ascii')) + dest = os.path.join( + ui.environ[b'HGEXCEPTIONSDIR'], str(uuid.uuid4()).encode('ascii') + ) exc_type, exc_value, exc_tb = sys.exc_info() @@ -69,6 +71,6 @@ ] fh.write(b'\0'.join(p.encode('utf-8', 'replace') for p in parts)) + def extsetup(ui): - extensions.wrapfunction(dispatch, 'handlecommandexception', - handleexception) + extensions.wrapfunction(dispatch, 'handlecommandexception', handleexception)