mirror of
https://github.com/katanemo/plano.git
synced 2026-05-24 14:05:14 +02:00
lint + formating with black (#158)
* lint + formating with black * add black as pre commit
This commit is contained in:
parent
498e7f9724
commit
5c4a6bc8ff
22 changed files with 581 additions and 295 deletions
|
|
@ -9,6 +9,7 @@ import logging
|
|||
|
||||
logger_instance = None
|
||||
|
||||
|
||||
def load_yaml_config(file_name):
|
||||
# Load the YAML file from the package
|
||||
yaml_path = pkg_resources.resource_filename("app", file_name)
|
||||
|
|
@ -138,6 +139,7 @@ class GuardHandler:
|
|||
}
|
||||
return result_dict
|
||||
|
||||
|
||||
def get_model_server_logger():
|
||||
global logger_instance
|
||||
|
||||
|
|
@ -164,8 +166,8 @@ def get_model_server_logger():
|
|||
level=logging.INFO,
|
||||
format="%(asctime)s - %(levelname)s - %(message)s",
|
||||
handlers=[
|
||||
logging.FileHandler(log_file_path, mode='w'), # Overwrite logs in file
|
||||
]
|
||||
logging.FileHandler(log_file_path, mode="w"), # Overwrite logs in file
|
||||
],
|
||||
)
|
||||
except (PermissionError, OSError) as e:
|
||||
# Dont' fallback to console logging if there are issues writing to the log file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue