Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
pre-commit run --all-files and pytest
Christian Clauss28c7a487c7fe
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex cac64adf4..c8519659d 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -10,18 +10,15 @@ jobs:- uses: actions/checkout@v4- uses: astral-sh/setup-uv@v5- run: uv run ruff format- - run: uv run pre-commit run check-toml --all-files- - run: uv run pre-commit run check-yaml --all-files- - run: uv run pre-commit run check-json --all-files- - run: uv run pre-commit run end-of-file-fixer --all-files- - run: uv run pre-commit run check-merge-conflict --all-files- - run: uv run pre-commit run check-illegal-windows-names --all-files- - run: uv run pre-commit run check-case-conflict --all-files- - run: uv run pre-commit run check-added-large-files --all-files- - run: uv run pre-commit run check-shebang-scripts-are-executable --all-files- - run: uv run pre-commit run check-symlinks --all-files- - run: uv run pre-commit run destroyed-symlinks --all-files- - run: uv run pre-commit run detect-private-key --all-files- - run: uv run pre-commit run mixed-line-ending --all-files- - run: uv run pre-commit run fix-byte-order-marker --all-files- #- run: uv run pytest tests/conftest.py+ - run: uv run pre-commit run --all-files+ # TODO: Fix the ignored pytests.+ # openai.OpenAIError: The api_key client option must be set either by passing+ # api_key to the client or by setting the OPENAI_API_KEY environment variable+ - run: uv run --with=dotenv pytest+ --ignore=tests/test_dropdown_error.py+ --ignore=tests/test_gif_path.py+ --ignore=tests/test_models.py+ --ignore=tests/test_react_dropdown.py+ --ignore=tests/test_save_conversation.py+ --ignore=tests/test_vision.py+ --ignore=tests/test_wait_for_element.pydiff --git a/browser_use/agent/prompts.py b/browser_use/agent/prompts.pyindex cc2d65700..a970bbf6a 100644--- a/browser_use/agent/prompts.py+++ b/browser_use/agent/prompts.py@@ -162,10 +162,6 @@ Ignore the other AI messages output structures.Keep your responses concise and focused on actionable insights."""if is_planner_reasoning:- return HumanMessage(- content=planner_prompt_text- )+ return HumanMessage(content=planner_prompt_text)else:- return SystemMessage(- content=planner_prompt_text- )+ return SystemMessage(content=planner_prompt_text)diff --git a/browser_use/agent/views.py b/browser_use/agent/views.pyindex 172e080e2..c0819e87e 100644--- a/browser_use/agent/views.py+++ b/browser_use/agent/views.py@@ -65,7 +65,7 @@ class AgentSettings(BaseModel):page_extraction_llm: Optional[BaseChatModel] = Noneplanner_llm: Optional[BaseChatModel] = Noneplanner_interval: int = 1 # Run planner every N steps- is_planner_reasoning: bool = False # type: ignore+ is_planner_reasoning: bool = False # type: ignoreclass AgentState(BaseModel):diff --git a/examples/notebook/agent_browsing.ipynb b/examples/notebook/agent_browsing.ipynbindex 42721f5ed..de5a9e97b 100644--- a/examples/notebook/agent_browsing.ipynb+++ b/examples/notebook/agent_browsing.ipynb@@ -8,7 +8,6 @@},"outputs": [],"source": [- "\n","%pip install -U langgraph langchain_google_genai langchain_community langgraph-checkpoint-postgres openai langchain_groq"]},