mirror of
				https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
				synced 2025-11-04 05:36:06 +00:00 
			
		
		
		
	code styling
This commit is contained in:
		
							
								
								
									
										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'
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user