mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 13:08:19 -04:00
fixed ruff errors
This commit is contained in:
@@ -73,8 +73,8 @@ def build_frontend(source_dir: Path | None, cache_dir: Path | None = None) -> Pa
|
|||||||
cache_dir.mkdir(parents=True, exist_ok=True)
|
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||||
env["npm_config_cache"] = str(cache_dir)
|
env["npm_config_cache"] = str(cache_dir)
|
||||||
|
|
||||||
subprocess.run(["npm", "install"], cwd=build_dir, env=env, check=True)
|
subprocess.run(["npm", "install"], cwd=build_dir, env=env, check=True) # noqa: S607
|
||||||
subprocess.run(["npm", "run", "build"], cwd=build_dir, env=env, check=True)
|
subprocess.run(["npm", "run", "build"], cwd=build_dir, env=env, check=True) # noqa: S607
|
||||||
|
|
||||||
dist_dir = build_dir / "dist"
|
dist_dir = build_dir / "dist"
|
||||||
if not dist_dir.exists():
|
if not dist_dir.exists():
|
||||||
|
|||||||
@@ -55,13 +55,7 @@ def get_connection_info() -> tuple[str, str, str, str, str | None]:
|
|||||||
password = getenv("POSTGRES_PASSWORD")
|
password = getenv("POSTGRES_PASSWORD")
|
||||||
|
|
||||||
if None in (database, host, port, username):
|
if None in (database, host, port, username):
|
||||||
error = (
|
error = f"Missing environment variables for Postgres connection.\n{database=}\n{host=}\n{port=}\n{username=}\n"
|
||||||
"Missing environment variables for Postgres connection.\n"
|
|
||||||
f"{database=}\n"
|
|
||||||
f"{host=}\n"
|
|
||||||
f"{port=}\n"
|
|
||||||
f"{username=}\n"
|
|
||||||
)
|
|
||||||
raise ValueError(error)
|
raise ValueError(error)
|
||||||
return cast("tuple[str, str, str, str, str | None]", (database, host, port, username, password))
|
return cast("tuple[str, str, str, str, str | None]", (database, host, port, username, password))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user