Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix: CI type errors and test compatibility

ShawnPana080eeae62a40
diff --git a/browser_use/skill_cli/commands/browser.py b/browser_use/skill_cli/commands/browser.py
index 781b2ccdd..380f41197 100644
--- a/browser_use/skill_cli/commands/browser.py
+++ b/browser_use/skill_cli/commands/browser.py
@@ -82,7 +82,6 @@ async def handle(action: str, session: SessionInfo, params: dict[str, Any]) -> A
"""Handle browser control command."""
bs = session.browser_session
actions = session.actions
- assert actions is not None, 'ActionHandler must be set on SessionInfo'
if action == 'open':
url = params['url']
diff --git a/browser_use/skill_cli/python_session.py b/browser_use/skill_cli/python_session.py
index 09b5fc513..e96cc0b96 100644
--- a/browser_use/skill_cli/python_session.py
+++ b/browser_use/skill_cli/python_session.py
@@ -121,9 +121,7 @@ class BrowserWrapper:
Runs coroutines on the server's event loop using run_coroutine_threadsafe.
"""
- def __init__(
- self, session: 'BrowserSession', loop: asyncio.AbstractEventLoop, actions: 'ActionHandler'
- ) -> None:
+ def __init__(self, session: 'BrowserSession', loop: asyncio.AbstractEventLoop, actions: 'ActionHandler') -> None:
self._session = session
self._loop = loop
self._actions = actions
diff --git a/browser_use/skill_cli/sessions.py b/browser_use/skill_cli/sessions.py
index eb8825fc3..c41020980 100644
--- a/browser_use/skill_cli/sessions.py
+++ b/browser_use/skill_cli/sessions.py
@@ -101,5 +101,8 @@ async def create_browser_session(
raise RuntimeError('\n'.join(lines))
return CLIBrowserSession(
- executable_path=chrome_path, user_data_dir=user_data_dir, profile_directory=profile_directory, headless=not headed
- ) # type: ignore[call-arg]
+ executable_path=chrome_path, # type: ignore[call-arg]
+ user_data_dir=user_data_dir, # type: ignore[call-arg]
+ profile_directory=profile_directory, # type: ignore[call-arg]
+ headless=not headed, # type: ignore[call-arg]
+ )