From 62c470b3de8172e22f83f2b6884f1419687ac994 Mon Sep 17 00:00:00 2001 From: Simon Moisy Date: Thu, 15 Jan 2026 21:11:09 +0800 Subject: [PATCH] Refactor dotenv loading in config.py to simplify environment variable management by removing the fallback logic and directly loading the .env file. --- live_trading/config.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/live_trading/config.py b/live_trading/config.py index 39172cd..47fb507 100644 --- a/live_trading/config.py +++ b/live_trading/config.py @@ -9,13 +9,7 @@ from pathlib import Path from dataclasses import dataclass, field from dotenv import load_dotenv -# Load .env from sibling project (BTC_spot_MVRV) -ENV_PATH = Path(__file__).parent.parent.parent / "BTC_spot_MVRV" / ".env" -if ENV_PATH.exists(): - load_dotenv(ENV_PATH) -else: - # Fallback to local .env - load_dotenv() +load_dotenv() @dataclass