Skip to content

Commit 66530dd

Browse files
author
SentienceDEV
committed
formatted
1 parent 73e2224 commit 66530dd

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

sentience/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from .agent import SentienceAgent, SentienceAgentAsync
3333
from .agent_config import AgentConfig
3434
from .agent_runtime import AgentRuntime, AssertionHandle
35-
from .debugger import SentienceDebugger
3635

3736
# Backend-agnostic actions (aliased to avoid conflict with existing actions)
3837
# Browser backends (for browser-use integration)
@@ -64,6 +63,7 @@
6463
from .cloud_tracing import CloudTraceSink, SentienceLogger
6564
from .conversational_agent import ConversationalAgent
6665
from .cursor_policy import CursorPolicy
66+
from .debugger import SentienceDebugger
6767
from .expect import expect
6868
from .generator import ScriptGenerator, generate
6969
from .inspector import Inspector, inspect

sentience/debugger.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
from __future__ import annotations
22

3+
from collections.abc import AsyncIterator
34
from contextlib import asynccontextmanager
4-
from typing import TYPE_CHECKING, Any, AsyncIterator
5+
from typing import TYPE_CHECKING, Any
56

67
from .agent_runtime import AgentRuntime
78
from .models import SnapshotOptions
89
from .tools import ToolRegistry
910

1011
if TYPE_CHECKING: # pragma: no cover - type hints only
1112
from playwright.async_api import Page
13+
1214
from .tracing import Tracer
1315
else: # pragma: no cover - avoid optional runtime imports
1416
Page = Any # type: ignore
@@ -32,7 +34,7 @@ def attach(
3234
snapshot_options: SnapshotOptions | None = None,
3335
sentience_api_key: str | None = None,
3436
tool_registry: ToolRegistry | None = None,
35-
) -> "SentienceDebugger":
37+
) -> SentienceDebugger:
3638
runtime = AgentRuntime.from_playwright_page(
3739
page=page,
3840
tracer=tracer,

tests/test_debugger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ async def test_attach_uses_runtime_factory() -> None:
2424
tracer = MockTracer()
2525
runtime = MockRuntime()
2626

27-
with patch("sentience.debugger.AgentRuntime.from_playwright_page", return_value=runtime) as mock_factory:
27+
with patch(
28+
"sentience.debugger.AgentRuntime.from_playwright_page", return_value=runtime
29+
) as mock_factory:
2830
from sentience.debugger import SentienceDebugger
2931

3032
debugger = SentienceDebugger.attach(page=mock_page, tracer=tracer)

0 commit comments

Comments
 (0)