mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-21 01:34:24 +00:00
fix: dotenv can not load
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
562d5a98cc
commit
9dc542ca45
14
pilot/configs/__init__.py
Normal file
14
pilot/configs/__init__.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import os
|
||||||
|
import random
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
if "pytest" in sys.argv or "pytest" in sys.modules or os.getenv("CI"):
|
||||||
|
print("Setting random seed to 42")
|
||||||
|
random.seed(42)
|
||||||
|
|
||||||
|
# Load the users .env file into environment variables
|
||||||
|
load_dotenv(verbose=True, override=True)
|
||||||
|
|
||||||
|
del load_dotenv
|
Loading…
Reference in New Issue
Block a user