Refactor dotenv loading in config.py to simplify environment variable management by removing the fallback logic and directly loading the .env file.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user