From 1d3255188e25cec76493377f27ae660b82db4dc8 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Wed, 16 Apr 2025 14:12:40 +0200 Subject: [PATCH] code styling --- app/util.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/util.py b/app/util.py index f6a2efb..3866d69 100644 --- a/app/util.py +++ b/app/util.py @@ -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'