added claude folder and removed project root constant

This commit is contained in:
tpv committed 2026-06-30 12:51:32 -07:00
1 parent 66dc759f91
commit e04909ebad
1 file changed
+6 -6
+6 -6
View File
@@ -27,14 +27,14 @@ def get_bot_token(is_production: bool) -> str:
def get_config(
monitor_name: str, use_production_path: bool = False
monitor_name: str,
config_dir: str | pathlib.Path = "configs",
test_config_dir: str | pathlib.Path = "tests/configs",
use_production_path: bool = False,
) -> tuple[dict, pathlib.Path]:
monitor_name = monitor_name.replace(".json", "")
if use_production_path:
config_path = PROJECT_ROOT / "configs" / f"{monitor_name}.json"
else:
config_path = PROJECT_ROOT / "tests" / "configs" / f"{monitor_name}.json"
base = config_dir if use_production_path else test_config_dir
config_path = pathlib.Path(base) / f"{monitor_name}.json"
with open(config_path) as f:
return json.load(f), config_path