From ef52d542554baf8e810a6c45521a281920e2a3ea Mon Sep 17 00:00:00 2001 From: Eric Z Date: Sat, 12 Apr 2025 17:16:39 -0500 Subject: [PATCH] fix(undefined-const): hotfix for missing constants; hazarding guess from context but breaks build --- config.py | 11 ++++++++++- main.py | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 7666d0a..28b1031 100644 --- a/config.py +++ b/config.py @@ -1,5 +1,5 @@ import os - +import logging #################################### # Load .env file #################################### @@ -11,5 +11,14 @@ try: except ImportError: print("dotenv not installed, skipping...") +# Define log levels dictionary +LOG_LEVELS = { + 'DEBUG': logging.DEBUG, + 'INFO': logging.INFO, + 'WARNING': logging.WARNING, + 'ERROR': logging.ERROR, + 'CRITICAL': logging.CRITICAL +} + API_KEY = os.getenv("PIPELINES_API_KEY", "0p3n-w3bu!") PIPELINES_DIR = os.getenv("PIPELINES_DIR", "./pipelines") diff --git a/main.py b/main.py index 1b3cc76..ca9c6c5 100644 --- a/main.py +++ b/main.py @@ -29,7 +29,7 @@ import sys import subprocess -from config import API_KEY, PIPELINES_DIR +from config import API_KEY, PIPELINES_DIR, LOG_LEVELS if not os.path.exists(PIPELINES_DIR): os.makedirs(PIPELINES_DIR)