Some style fixes
This commit is contained in:
@@ -210,6 +210,7 @@ def is_debug_mode() -> bool:
|
||||
return True
|
||||
raise ValueError(f"Failed to parse SPOOLMAN_DEBUG_MODE variable: Unknown debug mode '{debug_mode}'.")
|
||||
|
||||
|
||||
def is_cors_defined() -> bool:
|
||||
"""Get whether CORS is enabled from environment variables.
|
||||
|
||||
@@ -221,10 +222,8 @@ def is_cors_defined() -> bool:
|
||||
|
||||
"""
|
||||
cors = os.getenv("SPOOLMAN_CORS_ORIGIN", "FALSE").upper()
|
||||
if cors in {"FALSE", "0"}:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return cors not in {"FALSE", "0"}
|
||||
|
||||
|
||||
def get_cors_origin() -> Optional[list[str]]:
|
||||
"""Get the CORS origin from environment variables.
|
||||
@@ -240,6 +239,7 @@ def get_cors_origin() -> Optional[list[str]]:
|
||||
return None
|
||||
return cors.split(",")
|
||||
|
||||
|
||||
def is_automatic_backup_enabled() -> bool:
|
||||
"""Get whether automatic backup is enabled from environment variables.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user