mirror of
https://github.com/Xevion/linkpulse.git
synced 2025-12-06 03:15:35 -06:00
Fix mypy union-attr warning
stupid, I checked it twice and there's no possible way for it to be None?
This commit is contained in:
@@ -33,8 +33,10 @@ def drop_color_message_key(_: Any, __: Any, event_dict: EventDict) -> EventDict:
|
|||||||
|
|
||||||
def setup_logging(json_logs: Optional[bool] = None, log_level: Optional[str] = None) -> None:
|
def setup_logging(json_logs: Optional[bool] = None, log_level: Optional[str] = None) -> None:
|
||||||
# Pull from environment variables, apply defaults if not set
|
# Pull from environment variables, apply defaults if not set
|
||||||
json_logs = json_logs or os.getenv("LOG_JSON_FORMAT", "true").lower() == "true"
|
if json_logs is None:
|
||||||
log_level = log_level or os.getenv("LOG_LEVEL", "INFO")
|
json_logs = os.getenv("LOG_JSON_FORMAT", "true").lower() == "true"
|
||||||
|
if log_level is None:
|
||||||
|
log_level = os.getenv("LOG_LEVEL", "INFO")
|
||||||
|
|
||||||
def flatten(n):
|
def flatten(n):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user