Skip to content

Commit faf7247

Browse files
committed
Black everything
1 parent b5c7cf7 commit faf7247

33 files changed

+994
-1078
lines changed

.travis/upload_coverage.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ if [ -n "${TOXENV}" ]; then
77
case "${TOXENV}" in
88
pypy3-nocoverage);;
99
pep8);;
10-
py3pep8);;
1110
docs);;
1211
*)
1312
source ~/.venv/bin/activate

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
base_dir = os.path.join(os.path.dirname(__file__), os.pardir)
8282
about = {}
8383
with open(os.path.join(base_dir, "src", "cryptography", "__about__.py")) as f:
84-
exec (f.read(), about)
84+
exec(f.read(), about)
8585

8686
version = release = about["__version__"]
8787

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
about = {}
3535
with open(os.path.join(src_dir, "cryptography", "__about__.py")) as f:
36-
exec (f.read(), about)
36+
exec(f.read(), about)
3737

3838

3939
# `setup_requirements` must be kept in sync with `pyproject.toml`

src/_cffi_src/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
base_src = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1717
about = {}
1818
with open(os.path.join(base_src, "cryptography", "__about__.py")) as f:
19-
exec (f.read(), about)
19+
exec(f.read(), about)
2020

2121

2222
def build_ffi_for_binding(

src/cryptography/hazmat/backends/openssl/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ def _create_x509_extension(self, handlers, extension):
11641164
*[
11651165
encode_der(INTEGER, encode_der_integer(x.value))
11661166
for x in extension.value
1167-
]
1167+
],
11681168
)
11691169
value = _encode_asn1_str_gc(self, asn1)
11701170
return self._create_raw_x509_extension(extension, value)

src/cryptography/hazmat/backends/openssl/decode_asn1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def _decode_general_name(backend, gn):
130130
if "1" in bits[prefix:]:
131131
raise ValueError("Invalid netmask")
132132

133-
ip = ipaddress.ip_network(base.exploded + u"/{}".format(prefix))
133+
ip = ipaddress.ip_network(base.exploded + "/{}".format(prefix))
134134
else:
135135
ip = ipaddress.ip_address(data)
136136

src/cryptography/hazmat/primitives/asymmetric/dh.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ def public_key(self, backend=None):
8383

8484
class DHParameterNumbers(object):
8585
def __init__(self, p, g, q=None):
86-
if not isinstance(p, int) or not isinstance(
87-
g, int
88-
):
86+
if not isinstance(p, int) or not isinstance(g, int):
8987
raise TypeError("p and g must be integers")
9088
if q is not None and not isinstance(q, int):
9189
raise TypeError("q must be integer or None")

src/cryptography/hazmat/primitives/asymmetric/ec.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ def sign(self, data, signature_algorithm):
9595
"""
9696

9797

98-
class EllipticCurvePrivateKeyWithSerialization(EllipticCurvePrivateKey, metaclass=abc.ABCMeta):
98+
class EllipticCurvePrivateKeyWithSerialization(
99+
EllipticCurvePrivateKey, metaclass=abc.ABCMeta
100+
):
99101
@abc.abstractmethod
100102
def private_numbers(self):
101103
"""
@@ -335,9 +337,7 @@ def derive_private_key(private_value, curve, backend=None):
335337

336338
class EllipticCurvePublicNumbers(object):
337339
def __init__(self, x, y, curve):
338-
if not isinstance(x, int) or not isinstance(
339-
y, int
340-
):
340+
if not isinstance(x, int) or not isinstance(y, int):
341341
raise TypeError("x and y must be integers.")
342342

343343
if not isinstance(curve, EllipticCurve):

src/cryptography/hazmat/primitives/asymmetric/rsa.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,7 @@ def __hash__(self):
338338

339339
class RSAPublicNumbers(object):
340340
def __init__(self, e, n):
341-
if not isinstance(e, int) or not isinstance(
342-
n, int
343-
):
341+
if not isinstance(e, int) or not isinstance(n, int):
344342
raise TypeError("RSAPublicNumbers arguments must be integers.")
345343

346344
self._e = e

src/cryptography/x509/extensions.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,9 @@ def __init__(self, require_explicit_policy, inhibit_policy_mapping):
668668

669669
def __repr__(self):
670670
return (
671-
u"<PolicyConstraints(require_explicit_policy={0.require_explicit"
672-
u"_policy}, inhibit_policy_mapping={0.inhibit_policy_"
673-
u"mapping})>".format(self)
671+
"<PolicyConstraints(require_explicit_policy={0.require_explicit"
672+
"_policy}, inhibit_policy_mapping={0.inhibit_policy_"
673+
"mapping})>".format(self)
674674
)
675675

676676
def __eq__(self, other):
@@ -740,8 +740,7 @@ def __init__(self, policy_identifier, policy_qualifiers):
740740
if policy_qualifiers:
741741
policy_qualifiers = list(policy_qualifiers)
742742
if not all(
743-
isinstance(x, (str, UserNotice))
744-
for x in policy_qualifiers
743+
isinstance(x, (str, UserNotice)) for x in policy_qualifiers
745744
):
746745
raise TypeError(
747746
"policy_qualifiers must be a list of strings and/or "
@@ -1177,8 +1176,8 @@ def _validate_ip_name(self, tree):
11771176

11781177
def __repr__(self):
11791178
return (
1180-
u"<NameConstraints(permitted_subtrees={0.permitted_subtrees}, "
1181-
u"excluded_subtrees={0.excluded_subtrees})>".format(self)
1179+
"<NameConstraints(permitted_subtrees={0.permitted_subtrees}, "
1180+
"excluded_subtrees={0.excluded_subtrees})>".format(self)
11821181
)
11831182

11841183
def __hash__(self):

0 commit comments

Comments
 (0)