Skip to content

Commit 7fe0069

Browse files
committed
feat: remove python-dotenv dependency and loading
1 parent 5133680 commit 7fe0069

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

noxfile.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import nox
77
import platformdirs
8-
from dotenv import load_dotenv
8+
99
from nox.command import CommandFailed
1010
from nox.sessions import Session
1111

@@ -18,15 +18,6 @@
1818
SCRIPTS_FOLDER: Path = REPO_ROOT / "scripts"
1919
TEMPLATE_FOLDER: Path = REPO_ROOT / "{{cookiecutter.project_name}}"
2020

21-
22-
# 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)
29-
3021
APP_AUTHOR: str = os.getenv("COOKIECUTTER_ROBUST_PYTHON_APP_AUTHOR", "robust-python")
3122
COOKIECUTTER_ROBUST_PYTHON_CACHE_FOLDER: Path = Path(
3223
platformdirs.user_cache_path(
@@ -58,7 +49,7 @@
5849
@nox.session(python=DEFAULT_TEMPLATE_PYTHON_VERSION, name="generate-demo")
5950
def generate_demo(session: Session) -> None:
6051
"""Generates a project demo using the cookiecutter-robust-python template."""
61-
session.install("cookiecutter", "cruft", "platformdirs", "loguru", "python-dotenv", "typer")
52+
session.install("cookiecutter", "cruft", "platformdirs", "loguru", "typer")
6253
session.run("python", GENERATE_DEMO_SCRIPT, *GENERATE_DEMO_OPTIONS, *session.posargs)
6354

6455

@@ -136,7 +127,7 @@ def test(session: Session) -> None:
136127
@nox.session(python=DEFAULT_TEMPLATE_PYTHON_VERSION, name="update-demo")
137128
def update_demo(session: Session, add_rust_extension: bool) -> None:
138129
session.log("Installing script dependencies for updating generated project demos...")
139-
session.install("cookiecutter", "cruft", "platformdirs", "loguru", "python-dotenv", "typer")
130+
session.install("cookiecutter", "cruft", "platformdirs", "loguru", "typer")
140131

141132
session.log("Updating generated project demos...")
142133
args: list[str] = [*UPDATE_DEMO_OPTIONS]
@@ -161,7 +152,7 @@ def release_template(session: Session):
161152
session.skip("Git not available.")
162153

163154
session.log("Checking Commitizen availability via uvx.")
164-
session.run("cz", "--version", successcodes=[0])
155+
session.run("cz", "--version", success_codes=[0])
165156

166157
increment = session.posargs[0] if session.posargs else None
167158
session.log(

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ dependencies = [
1010
"gitpython>=3.1.44",
1111
"loguru>=0.7.3",
1212
"platformdirs>=4.3.8",
13-
"python-dotenv>=1.0.0",
1413
"retrocookie>=0.4.3",
1514
"typer>=0.15.4",
1615
]

uv.lock

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)