code styling

This commit is contained in:
Oscar Krause 2025-04-16 14:12:40 +02:00
parent cea7a01b54
commit 1d3255188e

View File

@ -8,6 +8,14 @@ from cryptography.hazmat.primitives.serialization import load_pem_private_key, l
logging.basicConfig()
def load_file(filename: str) -> bytes:
log = logging.getLogger(f'{__name__}')
log.debug(f'Loading contents of file "{filename}')
with open(filename, 'rb') as file:
content = file.read()
return content
class PrivateKey:
def __init__(self, data: bytes):
@ -77,13 +85,6 @@ class PublicKey:
format=serialization.PublicFormat.SubjectPublicKeyInfo
)
def load_file(filename: str) -> bytes:
log = logging.getLogger(f'{__name__}')
log.debug(f'Loading contents of file "{filename}')
with open(filename, 'rb') as file:
content = file.read()
return content
class DriverMatrix:
__DRIVER_MATRIX_FILENAME = 'static/driver_matrix.json'