Skip to content

CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.

style: apply ruff format to fork feature files

xf gong4658ab1dd58a
diff --git a/cubepi/checkpointer/base.py b/cubepi/checkpointer/base.py
index 16264c2..db78a30 100644
--- a/cubepi/checkpointer/base.py
+++ b/cubepi/checkpointer/base.py
@@ -43,9 +43,7 @@ class Checkpointer(Protocol):
"""
...
- async def snapshot(
- self, thread_id: str, *, after_run_id: str
- ) -> list[Message]:
+ async def snapshot(self, thread_id: str, *, after_run_id: str) -> list[Message]:
"""Return messages of completed runs of `thread_id` up through
and including `after_run_id`, in source seq order. Raises
ThreadNotFoundError or RunNotCompletedError."""
diff --git a/tests/agent/test_agent_messages_kw.py b/tests/agent/test_agent_messages_kw.py
index fb3a3f4..cc3c56b 100644
--- a/tests/agent/test_agent_messages_kw.py
+++ b/tests/agent/test_agent_messages_kw.py
@@ -45,8 +45,10 @@ def test_messages_kw_deep_copies_all_three_variants():
metadata={},
)
tool = ToolResultMessage(
- tool_call_id="c1", tool_name="t",
- content=[TextContent(text="r")], metadata={"x": 1},
+ tool_call_id="c1",
+ tool_name="t",
+ content=[TextContent(text="r")],
+ metadata={"x": 1},
)
a = _agent(messages=[user, assistant, tool])
# Mutate originals.
diff --git a/tests/checkpointer/test_exceptions.py b/tests/checkpointer/test_exceptions.py
index f8a87c2..6d2543a 100644
--- a/tests/checkpointer/test_exceptions.py
+++ b/tests/checkpointer/test_exceptions.py
@@ -38,9 +38,7 @@ def test_checkpointer_error_separate_from_schema_error():
def test_completion_marker_failed_error_carries_run_id():
cause = RuntimeError("db timeout")
- exc = CompletionMarkerFailedError(
- thread_id="t1", run_id="r1", cause=cause
- )
+ exc = CompletionMarkerFailedError(thread_id="t1", run_id="r1", cause=cause)
assert exc.thread_id == "t1"
assert exc.run_id == "r1"
assert exc.__cause__ is cause
diff --git a/tests/providers/test_message_run_id.py b/tests/providers/test_message_run_id.py
index 7ef9c6e..fb2b588 100644
--- a/tests/providers/test_message_run_id.py
+++ b/tests/providers/test_message_run_id.py
@@ -17,9 +17,7 @@ def test_assistant_message_run_id_default_none():
def test_tool_result_message_run_id_default_none():
- m = ToolResultMessage(
- tool_call_id="tc1", tool_name="foo", content=[]
- )
+ m = ToolResultMessage(tool_call_id="tc1", tool_name="foo", content=[])
assert m.run_id is None