Skip to content

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

lint

Laith Weinbergerf9c36f11a4da
diff --git a/browser_use/tools/service.py b/browser_use/tools/service.py
index 1e3d642aa..6a331754a 100644
--- a/browser_use/tools/service.py
+++ b/browser_use/tools/service.py
@@ -1713,7 +1713,7 @@ Context: {context}"""
break # no room for meaningful content
page_content = page_header + text
if len(page_content) > remaining:
- page_content = page_content[:remaining - len('\n[...truncated]')] + '\n[...truncated]'
+ page_content = page_content[: remaining - len('\n[...truncated]')] + '\n[...truncated]'
content_parts.append(page_content)
chars_used += len(page_content)
pages_included.append(page_num)