Mercurial > public > mercurial-scm > hg
comparison tests/test-status-inprocess.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 | 7ce9dea3a14a |
children | c102b704edb5 |
comparison
equal
deleted
inserted
replaced
43075:57875cf423c9 | 43076:2372284d9457 |
---|---|
8 localrepo, | 8 localrepo, |
9 ui as uimod, | 9 ui as uimod, |
10 ) | 10 ) |
11 | 11 |
12 print_ = print | 12 print_ = print |
13 | |
14 | |
13 def print(*args, **kwargs): | 15 def print(*args, **kwargs): |
14 """print() wrapper that flushes stdout buffers to avoid py3 buffer issues | 16 """print() wrapper that flushes stdout buffers to avoid py3 buffer issues |
15 | 17 |
16 We could also just write directly to sys.stdout.buffer the way the | 18 We could also just write directly to sys.stdout.buffer the way the |
17 ui object will, but this was easier for porting the test. | 19 ui object will, but this was easier for porting the test. |
18 """ | 20 """ |
19 print_(*args, **kwargs) | 21 print_(*args, **kwargs) |
20 sys.stdout.flush() | 22 sys.stdout.flush() |
23 | |
21 | 24 |
22 u = uimod.ui.load() | 25 u = uimod.ui.load() |
23 | 26 |
24 print('% creating repo') | 27 print('% creating repo') |
25 repo = localrepo.instance(u, b'.', create=True) | 28 repo = localrepo.instance(u, b'.', create=True) |