fix: clear flake8 errors blocking Forgejo CI
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
ci / test (push) Successful in 2m37s
Publish Python package / publish (push) Successful in 1m25s

Break long lines in engagement scaffolding, drop unused Callable import,
and simplify the metrics-cron f-string replace in engagement_promote.
This commit is contained in:
tegwick 2026-07-18 18:07:00 +02:00
parent f283b4a1ee
commit d64e50065a
2 changed files with 12 additions and 6 deletions

View file

@ -813,7 +813,10 @@ def staff_engagement(
(dest / agent_name).write_text(body, encoding="utf-8")
else:
(dest / agent_name).write_text(
f"---\nname: {role_id}\nengagement_id: {engagement_id}\nphase: staffing\n---\n\n# {role_id}\n",
(
f"---\nname: {role_id}\nengagement_id: {engagement_id}\n"
f"phase: staffing\n---\n\n# {role_id}\n"
),
encoding="utf-8",
)
@ -856,7 +859,10 @@ def staff_engagement(
f"# Access plan — {engagement_id}\n\n"
f"**Target:** {target_kind} `{target_id}`\n\n"
"Secrets: never stored in this tree.\n\n"
"## Verification log\n\n| Date | Result | Notes |\n|------|--------|-------|\n| _pending_ | | RU-01 |\n",
"## Verification log\n\n"
"| Date | Result | Notes |\n"
"|------|--------|-------|\n"
"| _pending_ | | RU-01 |\n",
encoding="utf-8",
)
(dest / "schedule.yml").write_text(

View file

@ -17,7 +17,7 @@ import subprocess
from dataclasses import dataclass, field
from datetime import date
from pathlib import Path
from typing import Any, Callable
from typing import Any
import yaml
@ -297,10 +297,10 @@ def _promote_definitions(
f"{from_prefix}-metrics-health-sweep",
f"{to_prefix}-metrics-health-sweep",
)
new_text = new_text.replace(
f"`0 6 * * *`",
f"`{loop_crons.get('quality-escalation', {}).get('metrics-health-sweep', '0 6 * * 1')}`",
metrics_cron = loop_crons.get("quality-escalation", {}).get(
"metrics-health-sweep", "0 6 * * 1"
)
new_text = new_text.replace("`0 6 * * *`", f"`{metrics_cron}`")
if new_text != text:
result.actions.append(
PromoteAction(