fix: clear flake8 errors blocking Forgejo CI
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:
parent
f283b4a1ee
commit
d64e50065a
2 changed files with 12 additions and 6 deletions
|
|
@ -813,7 +813,10 @@ def staff_engagement(
|
||||||
(dest / agent_name).write_text(body, encoding="utf-8")
|
(dest / agent_name).write_text(body, encoding="utf-8")
|
||||||
else:
|
else:
|
||||||
(dest / agent_name).write_text(
|
(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",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -856,7 +859,10 @@ def staff_engagement(
|
||||||
f"# Access plan — {engagement_id}\n\n"
|
f"# Access plan — {engagement_id}\n\n"
|
||||||
f"**Target:** {target_kind} `{target_id}`\n\n"
|
f"**Target:** {target_kind} `{target_id}`\n\n"
|
||||||
"Secrets: never stored in this tree.\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",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
(dest / "schedule.yml").write_text(
|
(dest / "schedule.yml").write_text(
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import subprocess
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Callable
|
from typing import Any
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|
@ -297,10 +297,10 @@ def _promote_definitions(
|
||||||
f"{from_prefix}-metrics-health-sweep",
|
f"{from_prefix}-metrics-health-sweep",
|
||||||
f"{to_prefix}-metrics-health-sweep",
|
f"{to_prefix}-metrics-health-sweep",
|
||||||
)
|
)
|
||||||
new_text = new_text.replace(
|
metrics_cron = loop_crons.get("quality-escalation", {}).get(
|
||||||
f"`0 6 * * *`",
|
"metrics-health-sweep", "0 6 * * 1"
|
||||||
f"`{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:
|
if new_text != text:
|
||||||
result.actions.append(
|
result.actions.append(
|
||||||
PromoteAction(
|
PromoteAction(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue