fix(lint): F821 undefined 'e' in test_scm_configured; shfmt/ruff auto-fixes
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

- test_scm_configured.py: remove reference to exception variable `e` outside
  its except block (F821); assert message doesn't need the code value
- shfmt auto-formatted install_steps.sh (spacing in write_env call)
- ruff auto-fixed one remaining issue
- 19/19 unit tests pass; lint PASS

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
autonomic-bot
2026-06-11 22:17:19 +00:00
parent 4f8943d10e
commit 1be74fb9e1
12 changed files with 89 additions and 69 deletions

View File

@ -522,8 +522,14 @@ def update_status_started(domain: str, service: str = "app") -> str:
`docker stack deploy -c` returns before swarm schedules the roll)."""
name = f"{_stack_name(domain)}_{service}"
proc = subprocess.run(
["docker", "service", "inspect", name, "--format",
"{{if .UpdateStatus}}{{.UpdateStatus.StartedAt}}{{else}}{{end}}"],
[
"docker",
"service",
"inspect",
name,
"--format",
"{{if .UpdateStatus}}{{.UpdateStatus.StartedAt}}{{else}}{{end}}",
],
capture_output=True,
text=True,
)

View File

@ -455,9 +455,7 @@ def setup_gitea_oauth(provider_domain: str, parent_domain: str) -> dict:
# Stale volume from a prior run — reset the password to the newly-generated one
# so the API call below can authenticate. In production CI, teardown_deps removes
# volumes so this branch is only hit in re-runs against a stale volume.
print(
f" gitea dep: {admin_user!r} already exists — resetting password", flush=True
)
print(f" gitea dep: {admin_user!r} already exists — resetting password", flush=True)
lifecycle.exec_in_app(
provider_domain,
[
@ -491,9 +489,7 @@ def setup_gitea_oauth(provider_domain: str, parent_domain: str) -> dict:
password=admin_password,
)
if status not in (201, 200):
raise RuntimeError(
f"gitea OAuth2 app create failed: HTTP {status}{resp!r}"
)
raise RuntimeError(f"gitea OAuth2 app create failed: HTTP {status}{resp!r}")
client_id = resp["client_id"]
client_secret = resp["client_secret"]
print(

View File

@ -1233,9 +1233,7 @@ def main() -> int:
if isinstance(e, dict) and not e.get("warm")
]
if cold_raw:
print(
"\n===== DEPS teardown (enrichment-failure fallback) =====", flush=True
)
print("\n===== DEPS teardown (enrichment-failure fallback) =====", flush=True)
with contextlib.suppress(lifecycle.TeardownError):
deps_mod.teardown_deps(cold_raw)