Skip to content

Commit 77c0c2c

Browse files
author
Dan Shernicoff
committed
Black formatting
1 parent a737878 commit 77c0c2c

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

adafruit_atecc/adafruit_atecc.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ class ATECC:
162162
CircuitPython interface for ATECCx08A Crypto Co-Processor Devices.
163163
"""
164164

165-
def __init__(self, i2c_bus: I2C, address: int =_REG_ATECC_DEVICE_ADDR, debug: bool = False):
165+
def __init__(
166+
self, i2c_bus: I2C, address: int = _REG_ATECC_DEVICE_ADDR, debug: bool = False
167+
):
166168
"""
167169
Initializes an ATECC device.
168170
@@ -447,7 +449,9 @@ def sha_digest(self, message: bytearray = None) -> bytearray:
447449
self.idle()
448450
return digest
449451

450-
def gen_key(self, key: bytearray, slot_num: int, private_key: bool = False) -> bytearray:
452+
def gen_key(
453+
self, key: bytearray, slot_num: int, private_key: bool = False
454+
) -> bytearray:
451455
"""
452456
Generates a private or public key.
453457
@@ -549,7 +553,9 @@ def _read(self, zone: Any, address: int, buffer: bytearray):
549553
time.sleep(0.001)
550554
self.idle()
551555

552-
def _send_command(self, opcode: int, param_1: int, param_2: int = 0x00, data: Sized = ""):
556+
def _send_command(
557+
self, opcode: int, param_1: int, param_2: int = 0x00, data: Sized = ""
558+
):
553559
"""
554560
Sends a security command packet over i2c.
555561

adafruit_atecc/adafruit_atecc_asn1.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,15 @@ def get_signature(signature: bytearray, data: bytearray) -> int:
9898

9999

100100
# pylint: disable=too-many-arguments
101-
def get_issuer_or_subject(data: bytearray, country: str, state_prov: str, locality: str, org: str,
102-
org_unit: str, common: str):
101+
def get_issuer_or_subject(
102+
data: bytearray,
103+
country: str,
104+
state_prov: str,
105+
locality: str,
106+
org: str,
107+
org_unit: str,
108+
common: str,
109+
):
103110
"""
104111
Appends issuer or subject, if they exist, to data.
105112
@@ -234,7 +241,9 @@ def get_sequence_header_length(seq_header_len: int) -> int:
234241
return 2
235242

236243

237-
def issuer_or_subject_length(country: str, state_prov: str, city: str, org: str, org_unit: str, common: str) -> int:
244+
def issuer_or_subject_length(
245+
country: str, state_prov: str, city: str, org: str, org_unit: str, common: str
246+
) -> int:
238247
"""
239248
Returns total length of provided certificate information.
240249

adafruit_atecc/adafruit_atecc_cert_util.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,15 @@ class CSR:
5757

5858
# pylint: disable=too-many-arguments, too-many-instance-attributes
5959
def __init__(
60-
self, atecc: ATECC, slot_num: int, private_key: bool, country: str, state_prov: str, city: str,
61-
org: str, org_unit: str
60+
self,
61+
atecc: ATECC,
62+
slot_num: int,
63+
private_key: bool,
64+
country: str,
65+
state_prov: str,
66+
city: str,
67+
org: str,
68+
org_unit: str,
6269
):
6370
self._atecc = atecc
6471
self.private_key = private_key

0 commit comments

Comments
 (0)