File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 11"""Noxfile for the cookiecutter-robust-python template."""
2+
3+ # /// script
4+ # dependencies = ["python-dotenv>=1.0.0"]
5+ # ///
6+
27import os
38import shutil
49from pathlib import Path
2025
2126
2227# Load environment variables from .env and .env.local (if present)
23- _env_file : Path = REPO_ROOT / ".env"
24- _env_local_file : Path = REPO_ROOT / ".env.local"
25- if _env_file .exists ():
26- load_dotenv (_env_file )
27- if _env_local_file .exists ():
28- load_dotenv (_env_local_file , override = True )
28+ LOCAL_ENV_FILE : Path = REPO_ROOT / ".env.local"
29+ DEFAULT_ENV_FILE : Path = REPO_ROOT / ".env"
30+
31+ if LOCAL_ENV_FILE .exists ():
32+ load_dotenv (LOCAL_ENV_FILE )
33+
34+ if DEFAULT_ENV_FILE .exists ():
35+ load_dotenv (DEFAULT_ENV_FILE )
2936
3037APP_AUTHOR : str = os .getenv ("COOKIECUTTER_ROBUST_PYTHON_APP_AUTHOR" , "robust-python" )
3138COOKIECUTTER_ROBUST_PYTHON_CACHE_FOLDER : Path = Path (
You can’t perform that action at this time.
0 commit comments