forked from oscar.krause/fastapi-dls
code styling
This commit is contained in:
parent
cea7a01b54
commit
1d3255188e
15
app/util.py
15
app/util.py
@ -8,6 +8,14 @@ from cryptography.hazmat.primitives.serialization import load_pem_private_key, l
|
|||||||
logging.basicConfig()
|
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:
|
class PrivateKey:
|
||||||
|
|
||||||
def __init__(self, data: bytes):
|
def __init__(self, data: bytes):
|
||||||
@ -77,13 +85,6 @@ class PublicKey:
|
|||||||
format=serialization.PublicFormat.SubjectPublicKeyInfo
|
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:
|
class DriverMatrix:
|
||||||
__DRIVER_MATRIX_FILENAME = 'static/driver_matrix.json'
|
__DRIVER_MATRIX_FILENAME = 'static/driver_matrix.json'
|
||||||
|
Loading…
Reference in New Issue
Block a user