Skip to content

Commit f8dfc38

Browse files
committed
💄 style(core): apply formatter updates
- Normalize formatting across core/orchestrator, api, cli, and tests. - Collapse multiline string literals and whitespace-only diffs. Why: keep repo style consistent after hook reformat. Tests: uv run ruff check . Dependencies: none
1 parent fb42138 commit f8dfc38

8 files changed

Lines changed: 13 additions & 51 deletions

File tree

apps/meeseeks_api/src/meeseeks_api/backend.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,7 @@ def get(self) -> tuple[dict, int]:
512512
return auth_error
513513
include_dismissed = _parse_bool(request.args.get("include_dismissed"))
514514
return {
515-
"notifications": notification_store.list(
516-
include_dismissed=include_dismissed
517-
),
515+
"notifications": notification_store.list(include_dismissed=include_dismissed),
518516
}, 200
519517

520518

apps/meeseeks_cli/src/meeseeks_cli/cli_dialogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from textual.widgets import Input, Label, OptionList, SelectionList
1818

1919
_DOTTED_BOX = box.Box(
20-
".:.:" "\n: ::" "\n.:.:" "\n: ::" "\n.:.:" "\n.:.:" "\n: ::" "\n.:.:",
20+
".:.:\n: ::\n.:.:\n: ::\n.:.:\n.:.:\n: ::\n.:.:",
2121
ascii=True,
2222
)
2323

packages/meeseeks_core/src/meeseeks_core/classes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ class ActionStep(BaseModel):
5454
"Use only tool IDs listed under Available tools."
5555
)
5656
)
57-
action_type: str = Field(
58-
description="Specify the execution type (legacy get/set or execute)."
59-
)
57+
action_type: str = Field(description="Specify the execution type (legacy get/set or execute).")
6058
action_argument: ActionArgument = Field(
6159
description=(
6260
"Provide details for the action. If 'task', specify the task to perform. "

packages/meeseeks_core/src/meeseeks_core/orchestrator.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ def _run_with_session_context(
130130
state.summary = summary
131131
state.done = True
132132
state.done_reason = "compacted"
133-
task_queue = self._build_direct_response(
134-
f"Compaction complete. Summary: {summary}"
135-
)
133+
task_queue = self._build_direct_response(f"Compaction complete. Summary: {summary}")
136134
return (task_queue, state) if return_state else task_queue
137135

138136
context = self._context_builder.build(
@@ -205,9 +203,7 @@ def _run_with_session_context(
205203
elif decision_type == "tool":
206204
tool_id = str(decision.tool_id or "").strip()
207205
if not tool_id or tool_id not in allowed_tool_ids:
208-
last_error = (
209-
f"Tool '{tool_id or 'unknown'}' not allowed for this step."
210-
)
206+
last_error = f"Tool '{tool_id or 'unknown'}' not allowed for this step."
211207
tool_outputs.append(f"ERROR: {last_error}")
212208
else:
213209
args = decision.args
@@ -220,9 +216,7 @@ def _run_with_session_context(
220216
tool_id,
221217
args,
222218
)
223-
run_queue = TaskQueue(
224-
plan_steps=plan.steps, action_steps=[action_step]
225-
)
219+
run_queue = TaskQueue(plan_steps=plan.steps, action_steps=[action_step])
226220
run_queue = self._run_action_plan(
227221
session_id,
228222
run_queue,
@@ -261,9 +255,7 @@ def _run_with_session_context(
261255
state.done_reason = "max_steps_reached"
262256
elif last_error:
263257
state.done_reason = (
264-
"blocked"
265-
if "permission denied" in last_error.lower()
266-
else "incomplete"
258+
"blocked" if "permission denied" in last_error.lower() else "incomplete"
267259
)
268260
else:
269261
state.done_reason = "completed"

packages/meeseeks_core/src/meeseeks_core/planning.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,7 @@ def update(
513513
"""Return updated remaining steps."""
514514
parser = PydanticOutputParser(pydantic_object=PlanUpdate) # type: ignore[type-var]
515515
system_prompt = get_system_prompt("plan-updater")
516-
remaining_lines = [
517-
f"- {step.title}: {step.description}" for step in remaining_steps
518-
]
516+
remaining_lines = [f"- {step.title}: {step.description}" for step in remaining_steps]
519517
remaining_text = "\n".join(remaining_lines) or "(none)"
520518
prompt = ChatPromptTemplate(
521519
messages=[

tests/test_aider_edit_blocks.py

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@
1919

2020

2121
def _block(path: str, search: str, replace: str) -> str:
22-
return (
23-
f"{path}\n"
24-
"```text\n"
25-
"<<<<<<< SEARCH\n"
26-
f"{search}=======\n"
27-
f"{replace}>>>>>>> REPLACE\n"
28-
"```\n"
29-
)
22+
return f"{path}\n```text\n<<<<<<< SEARCH\n{search}=======\n{replace}>>>>>>> REPLACE\n```\n"
3023

3124

3225
def test_apply_search_replace_block(tmp_path):
@@ -212,9 +205,6 @@ def test_edit_block_tool_uses_cwd_for_string_argument(monkeypatch, tmp_path):
212205
assert target.read_text(encoding="utf-8") == "hello\nthere\n"
213206

214207

215-
216-
217-
218208
def test_edit_block_tool_input_error_guidance_when_blank():
219209
"""Return guidance when no message is provided."""
220210
message = _format_tool_input_error("")
@@ -257,28 +247,14 @@ def test_apply_search_replace_block_missing_leading_whitespace(tmp_path):
257247
)
258248
def test_parse_search_replace_blocks_filename_variants(header, expected):
259249
"""Normalize filename markers before SEARCH blocks."""
260-
content = (
261-
f"{header}\n"
262-
"<<<<<<< SEARCH\n"
263-
"old\n"
264-
"=======\n"
265-
"new\n"
266-
">>>>>>> REPLACE\n"
267-
)
250+
content = f"{header}\n<<<<<<< SEARCH\nold\n=======\nnew\n>>>>>>> REPLACE\n"
268251
edits, shell_blocks = parse_search_replace_blocks(content, valid_fnames=None)
269252
assert not shell_blocks
270253
assert edits[0].path == expected
271254

272255

273256
def test_parse_search_replace_blocks_prefers_valid_fnames():
274257
"""Prefer close matches from valid filename list."""
275-
content = (
276-
"file.txt\n"
277-
"<<<<<<< SEARCH\n"
278-
"old\n"
279-
"=======\n"
280-
"new\n"
281-
">>>>>>> REPLACE\n"
282-
)
258+
content = "file.txt\n<<<<<<< SEARCH\nold\n=======\nnew\n>>>>>>> REPLACE\n"
283259
edits, _ = parse_search_replace_blocks(content, valid_fnames=["a/file.txt"])
284260
assert edits[0].path == "a/file.txt"

tests/test_components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_format_component_status():
4848
ComponentStatus(name="home_assistant_tool", enabled=True),
4949
]
5050
)
51-
assert status_text == ("- langfuse: disabled (disabled)\n" "- home_assistant_tool: enabled")
51+
assert status_text == ("- langfuse: disabled (disabled)\n- home_assistant_tool: enabled")
5252

5353

5454
def test_langfuse_status_requires_keys(monkeypatch):

tests/test_tool_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_manifest_local_tool(tmp_path, monkeypatch):
6161
"""Load a local tool from a manifest entry."""
6262
module_path = tmp_path / "dummy_tool.py"
6363
module_path.write_text(
64-
"class DummyTool:\n" " def run(self, action_step):\n" " return None\n",
64+
"class DummyTool:\n def run(self, action_step):\n return None\n",
6565
encoding="utf-8",
6666
)
6767
manifest_path = tmp_path / "manifest.json"

0 commit comments

Comments
 (0)