Skip to content

Commit f75dec6

Browse files
committed
style: reformat mcp files with ruff format (not black)
1 parent ba595b5 commit f75dec6

3 files changed

Lines changed: 721 additions & 24 deletions

File tree

src/klondike_spec_cli/mcp_server.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,7 @@ def get_status() -> dict[str, Any]:
409409
"percent": progress_pct,
410410
},
411411
"by_status": by_status,
412-
"current_session": (
413-
current_session.to_dict() if current_session else None
414-
),
412+
"current_session": (current_session.to_dict() if current_session else None),
415413
"priority_features": [
416414
{"id": f.id, "description": f.description, "priority": f.priority}
417415
for f in priority_features
@@ -478,8 +476,7 @@ def start_session(focus: str) -> dict[str, Any]:
478476
"percent": progress_pct,
479477
},
480478
"priority_features": [
481-
{"id": f.id, "description": f.description}
482-
for f in priority_features
479+
{"id": f.id, "description": f.description} for f in priority_features
483480
],
484481
}
485482
except FileNotFoundError as e:
@@ -514,19 +511,13 @@ def end_session(
514511
current.focus = summary
515512

516513
if completed:
517-
current.completed = [
518-
c.strip() for c in completed.split(",") if c.strip()
519-
]
514+
current.completed = [c.strip() for c in completed.split(",") if c.strip()]
520515

521516
if next_steps:
522-
current.next_steps = [
523-
n.strip() for n in next_steps.split(",") if n.strip()
524-
]
517+
current.next_steps = [n.strip() for n in next_steps.split(",") if n.strip()]
525518
else:
526519
priority = registry.get_priority_features(3)
527-
current.next_steps = [
528-
f"Continue {f.id}: {f.description}" for f in priority
529-
]
520+
current.next_steps = [f"Continue {f.id}: {f.description}" for f in priority]
530521

531522
progress.current_status = "Session Ended"
532523
_update_quick_reference(progress, registry)
@@ -649,9 +640,7 @@ def run_server(transport: str = "stdio") -> None:
649640
transport: Transport type (stdio or streamable-http)
650641
"""
651642
if not MCP_AVAILABLE:
652-
logger.error(
653-
"MCP SDK not installed. Install with: pip install 'klondike-spec-cli[mcp]'"
654-
)
643+
logger.error("MCP SDK not installed. Install with: pip install 'klondike-spec-cli[mcp]'")
655644
raise ImportError("MCP SDK not available")
656645

657646
mcp = create_mcp_server()

tests/test_mcp.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ def test_mcp_config_writes_to_file(self):
5757
runner.invoke(app, ["init"])
5858

5959
output_path = Path(tmpdir) / "mcp-config.json"
60-
result = runner.invoke(
61-
app, ["mcp", "config", "--output", str(output_path)]
62-
)
60+
result = runner.invoke(app, ["mcp", "config", "--output", str(output_path)])
6361

6462
assert result.exit_code == 0
6563
assert output_path.exists()
@@ -81,9 +79,7 @@ def test_mcp_install_generates_config(self):
8179
runner.invoke(app, ["init"])
8280

8381
output_path = Path(tmpdir) / "mcp-install-config.json"
84-
result = runner.invoke(
85-
app, ["mcp", "install", "--output", str(output_path)]
86-
)
82+
result = runner.invoke(app, ["mcp", "install", "--output", str(output_path)])
8783

8884
assert result.exit_code == 0
8985
assert "MCP configuration generated" in result.output

0 commit comments

Comments
 (0)