Add config and client injection with test reorganization.
Introduce typed config objects, optional adapter injection, and .env loading to simplify testing while preserving env-based defaults for production usage. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
366831ac52
commit
7991dabdbc
@@ -0,0 +1,14 @@
|
||||
"""Load environment variables from a .env file."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv as _load_dotenv
|
||||
|
||||
|
||||
def load_dotenv(path: str | Path | None = None) -> bool:
|
||||
"""Load .env into os.environ. Idempotent; returns True if a file was loaded."""
|
||||
if path is None:
|
||||
return bool(_load_dotenv())
|
||||
return bool(_load_dotenv(path))
|
||||
Reference in New Issue
Block a user