Format Python code with psf/black push

github-actions 1 year ago
parent 0cd1e39367
commit 40a74d8a0b

@ -242,18 +242,21 @@ class EnvService:
except Exception:
return None
@staticmethod
def get_api_db():
user_input_api_keys = EnvService.get_user_input_api_keys()
user_key_db = None
if user_input_api_keys:
print("This server was configured to enforce user input API keys. Doing the required database setup now")
print(
"This server was configured to enforce user input API keys. Doing the required database setup now"
)
# Get user_key_db from environment variable
user_key_db_path = EnvService.get_user_key_db_path()
# Check if user_key_db_path is valid
if not user_key_db_path:
print("No user key database path was provided. Defaulting to user_key_db.sqlite")
print(
"No user key database path was provided. Defaulting to user_key_db.sqlite"
)
user_key_db_path = "user_key_db.sqlite"
else:
# append "user_key_db.sqlite" to USER_KEY_DB_PATH if it doesn't already end with .sqlite
@ -265,9 +268,6 @@ class EnvService:
return user_key_db
return user_key_db
@staticmethod
def get_deepl_token():
try:

Loading…
Cancel
Save