Skip to content

Commit 884a71a

Browse files
tbitcsoz-agent
andcommitted
fix: ruff format on agents module files
Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 4525dfa commit 884a71a

5 files changed

Lines changed: 28 additions & 15 deletions

File tree

src/specsmith/agents/reports.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ class ChangeReport:
3333
tests_failed: int = 0
3434
summary: str = ""
3535
follow_up_tasks: list[str] = field(default_factory=list)
36-
created: str = field(
37-
default_factory=lambda: datetime.now(tz=timezone.utc).isoformat()
38-
)
36+
created: str = field(default_factory=lambda: datetime.now(tz=timezone.utc).isoformat())
3937

4038
def to_dict(self) -> dict[str, Any]:
4139
"""Convert to a JSON-serializable dict (excludes verbose fields)."""
@@ -69,10 +67,11 @@ def list_reports(project_dir: str = ".") -> list[ChangeReport]:
6967
for path in sorted(reports_dir.glob("*.json"), reverse=True):
7068
try:
7169
data = json.loads(path.read_text(encoding="utf-8"))
72-
reports.append(ChangeReport(**{
73-
k: v for k, v in data.items()
74-
if k in ChangeReport.__dataclass_fields__
75-
}))
70+
reports.append(
71+
ChangeReport(
72+
**{k: v for k, v in data.items() if k in ChangeReport.__dataclass_fields__}
73+
)
74+
)
7675
except Exception: # noqa: BLE001
7776
pass
7877
return reports

src/specsmith/agents/roles.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,13 @@ def _git_diff() -> str:
156156
human_input_mode="NEVER",
157157
llm_config=llm_config,
158158
functions=[
159-
_read_file, _write_file, _patch_file, _list_tree,
160-
_run_command, _git_status, _git_diff,
159+
_read_file,
160+
_write_file,
161+
_patch_file,
162+
_list_tree,
163+
_run_command,
164+
_git_status,
165+
_git_diff,
161166
],
162167
)
163168
return agent

src/specsmith/agents/tools/filesystem.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,19 @@ def search_content(
135135

136136
_SKIP = {".git", "__pycache__", "node_modules", ".venv", "venv", ".specsmith"}
137137
_TEXT_EXT = {
138-
".py", ".md", ".txt", ".yml", ".yaml", ".toml",
139-
".json", ".js", ".ts", ".sh", ".cmd", ".cfg", ".ini",
138+
".py",
139+
".md",
140+
".txt",
141+
".yml",
142+
".yaml",
143+
".toml",
144+
".json",
145+
".js",
146+
".ts",
147+
".sh",
148+
".cmd",
149+
".cfg",
150+
".ini",
140151
}
141152
try:
142153
compiled = re.compile(pattern, re.IGNORECASE)

src/specsmith/agents/workflows/improve.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ def run_improvement(
104104
report.verdict = "UNCLEAR"
105105

106106
# Extract test results
107-
report.tests_run, report.tests_passed, report.tests_failed = (
108-
_extract_test_counts(verify_text)
109-
)
107+
report.tests_run, report.tests_passed, report.tests_failed = _extract_test_counts(verify_text)
110108

111109
# Generate follow-up tasks
112110
report.follow_up_tasks = _extract_follow_ups(verify_text, build_text)

src/specsmith/auditor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ def check_supplementary_rules(root: Path) -> list[AuditResult]:
666666
+ (
667667
". Add them to the auto-load registry."
668668
if len(unreferenced) <= 5
669-
else f" (+{len(unreferenced)-5} more)"
669+
else f" (+{len(unreferenced) - 5} more)"
670670
)
671671
),
672672
fixable=True,

0 commit comments

Comments
 (0)