Mercurial > public > mercurial-scm > hg
comparison contrib/automation/automation.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 | b05a3e28cf24 |
children |
comparison
equal
deleted
inserted
replaced
43075:57875cf423c9 | 43076:2372284d9457 |
---|---|
34 else: | 34 else: |
35 venv_bin = VENV / 'bin' | 35 venv_bin = VENV / 'bin' |
36 pip = venv_bin / 'pip' | 36 pip = venv_bin / 'pip' |
37 python = venv_bin / 'python' | 37 python = venv_bin / 'python' |
38 | 38 |
39 args = [str(pip), 'install', '-r', str(REQUIREMENTS_TXT), | 39 args = [ |
40 '--disable-pip-version-check'] | 40 str(pip), |
41 'install', | |
42 '-r', | |
43 str(REQUIREMENTS_TXT), | |
44 '--disable-pip-version-check', | |
45 ] | |
41 | 46 |
42 if not venv_created: | 47 if not venv_created: |
43 args.append('-q') | 48 args.append('-q') |
44 | 49 |
45 subprocess.run(args, check=True) | 50 subprocess.run(args, check=True) |
46 | 51 |
47 os.environ['HGAUTOMATION_BOOTSTRAPPED'] = '1' | 52 os.environ['HGAUTOMATION_BOOTSTRAPPED'] = '1' |
48 os.environ['PATH'] = '%s%s%s' % ( | 53 os.environ['PATH'] = '%s%s%s' % (venv_bin, os.pathsep, os.environ['PATH']) |
49 venv_bin, os.pathsep, os.environ['PATH']) | |
50 | 54 |
51 subprocess.run([str(python), __file__] + sys.argv[1:], check=True) | 55 subprocess.run([str(python), __file__] + sys.argv[1:], check=True) |
52 | 56 |
53 | 57 |
54 def run(): | 58 def run(): |