Mercurial > hg
comparison contrib/automation/hgautomation/__init__.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 | dd6a9723ae2b |
children |
comparison
equal
deleted
inserted
replaced
43075:57875cf423c9 | 43076:2372284d9457 |
---|---|
8 # no-check-code because Python 3 native. | 8 # no-check-code because Python 3 native. |
9 | 9 |
10 import pathlib | 10 import pathlib |
11 import secrets | 11 import secrets |
12 | 12 |
13 from .aws import ( | 13 from .aws import AWSConnection |
14 AWSConnection, | |
15 ) | |
16 | 14 |
17 | 15 |
18 class HGAutomation: | 16 class HGAutomation: |
19 """High-level interface for Mercurial automation. | 17 """High-level interface for Mercurial automation. |
20 | 18 |
51 | 49 |
52 p.chmod(0o0600) | 50 p.chmod(0o0600) |
53 | 51 |
54 return password | 52 return password |
55 | 53 |
56 def aws_connection(self, region: str, ensure_ec2_state: bool=True): | 54 def aws_connection(self, region: str, ensure_ec2_state: bool = True): |
57 """Obtain an AWSConnection instance bound to a specific region.""" | 55 """Obtain an AWSConnection instance bound to a specific region.""" |
58 | 56 |
59 return AWSConnection(self, region, ensure_ec2_state=ensure_ec2_state) | 57 return AWSConnection(self, region, ensure_ec2_state=ensure_ec2_state) |