Mercurial > public > mercurial-scm > hg-stable
diff tests/printenv.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 | 73da729ccfef |
children | c102b704edb5 |
line wrap: on
line diff
--- a/tests/printenv.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/printenv.py Sun Oct 06 09:45:02 2019 -0400 @@ -19,6 +19,7 @@ try: import msvcrt + msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) @@ -52,8 +53,7 @@ # variables with empty values may not exist on all platforms, filter # them now for portability sake. -env = [(k, v) for k, v in os.environ.items() - if k.startswith("HG_") and v] +env = [(k, v) for k, v in os.environ.items() if k.startswith("HG_") and v] env.sort() out.write(b"%s hook: " % args.name.encode('ascii')) @@ -62,8 +62,9 @@ else: filter = lambda x: x -vars = [b"%s=%s" % (k.encode('ascii'), filter(v).encode('ascii')) - for k, v in env] +vars = [ + b"%s=%s" % (k.encode('ascii'), filter(v).encode('ascii')) for k, v in env +] # Print variables on out if not args.line: