Skip to content

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

style: fix ruff lint/format issues

ShawnPana5aeb6beeb5d3
diff --git a/browser_use/skill_cli/commands/session_management.py b/browser_use/skill_cli/commands/session_management.py
index 1ab13376c..21e39c0db 100644
--- a/browser_use/skill_cli/commands/session_management.py
+++ b/browser_use/skill_cli/commands/session_management.py
@@ -272,7 +272,7 @@ def _handle_create(args: argparse.Namespace) -> int:
screen_width = int(w)
screen_height = int(h)
except ValueError:
- print(f'Error: Invalid screen size format. Use WxH (e.g., 1920x1080)', file=sys.stderr)
+ print('Error: Invalid screen size format. Use WxH (e.g., 1920x1080)', file=sys.stderr)
return 1
try:
@@ -325,12 +325,16 @@ def _handle_share(args: argparse.Namespace) -> int:
return 1
if getattr(args, 'json', False):
- print(json.dumps({
- 'sessionId': session_id,
- 'url': share.share_url,
- 'shareToken': share.share_token,
- 'viewCount': share.view_count,
- }))
+ print(
+ json.dumps(
+ {
+ 'sessionId': session_id,
+ 'url': share.share_url,
+ 'shareToken': share.share_token,
+ 'viewCount': share.view_count,
+ }
+ )
+ )
else:
print(f'Public share created for session: {session_id}')
if share.share_url:
diff --git a/browser_use/skill_cli/main.py b/browser_use/skill_cli/main.py
index 6b007cf72..888850899 100755
--- a/browser_use/skill_cli/main.py
+++ b/browser_use/skill_cli/main.py
@@ -654,7 +654,12 @@ Setup:
p.add_argument('--start-url', help=f'{remote_hint}URL to start the task from')
p.add_argument('--metadata', action='append', metavar='KEY=VALUE', help=f'{remote_hint}Task metadata (can repeat)')
p.add_argument('--secret', action='append', metavar='KEY=VALUE', help=f'{remote_hint}Task secrets (can repeat)')
- p.add_argument('--allowed-domain', action='append', metavar='DOMAIN', help=f'{remote_hint}Restrict navigation to domains (can repeat)')
+ p.add_argument(
+ '--allowed-domain',
+ action='append',
+ metavar='DOMAIN',
+ help=f'{remote_hint}Restrict navigation to domains (can repeat)',
+ )
p.add_argument('--skill-id', action='append', metavar='ID', help=f'{remote_hint}Enable skill IDs (can repeat)')
p.add_argument('--structured-output', metavar='SCHEMA', help=f'{remote_hint}JSON schema for structured output')
p.add_argument('--judge', action='store_true', help=f'{remote_hint}Enable judge mode')