Skip to content

Commit 28c7a48

Browse files
committed
pre-commit run --all-files and pytest
1 parent b7f3a20 commit 28c7a48

File tree

4 files changed

+15
-23
lines changed

4 files changed

+15
-23
lines changed

.github/workflows/lint.yml

+12-15
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- uses: astral-sh/setup-uv@v5
1212
- run: uv run ruff format
13-
- run: uv run pre-commit run check-toml --all-files
14-
- run: uv run pre-commit run check-yaml --all-files
15-
- run: uv run pre-commit run check-json --all-files
16-
- run: uv run pre-commit run end-of-file-fixer --all-files
17-
- run: uv run pre-commit run check-merge-conflict --all-files
18-
- run: uv run pre-commit run check-illegal-windows-names --all-files
19-
- run: uv run pre-commit run check-case-conflict --all-files
20-
- run: uv run pre-commit run check-added-large-files --all-files
21-
- run: uv run pre-commit run check-shebang-scripts-are-executable --all-files
22-
- run: uv run pre-commit run check-symlinks --all-files
23-
- run: uv run pre-commit run destroyed-symlinks --all-files
24-
- run: uv run pre-commit run detect-private-key --all-files
25-
- run: uv run pre-commit run mixed-line-ending --all-files
26-
- run: uv run pre-commit run fix-byte-order-marker --all-files
27-
#- run: uv run pytest tests/conftest.py
13+
- run: uv run pre-commit run --all-files
14+
# TODO: Fix the ignored pytests.
15+
# openai.OpenAIError: The api_key client option must be set either by passing
16+
# api_key to the client or by setting the OPENAI_API_KEY environment variable
17+
- run: uv run --with=dotenv pytest
18+
--ignore=tests/test_dropdown_error.py
19+
--ignore=tests/test_gif_path.py
20+
--ignore=tests/test_models.py
21+
--ignore=tests/test_react_dropdown.py
22+
--ignore=tests/test_save_conversation.py
23+
--ignore=tests/test_vision.py
24+
--ignore=tests/test_wait_for_element.py

browser_use/agent/prompts.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ def get_system_message(self, is_planner_reasoning) -> Union[SystemMessage, Human
162162
Keep your responses concise and focused on actionable insights."""
163163

164164
if is_planner_reasoning:
165-
return HumanMessage(
166-
content=planner_prompt_text
167-
)
165+
return HumanMessage(content=planner_prompt_text)
168166
else:
169-
return SystemMessage(
170-
content=planner_prompt_text
171-
)
167+
return SystemMessage(content=planner_prompt_text)

browser_use/agent/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class AgentSettings(BaseModel):
6565
page_extraction_llm: Optional[BaseChatModel] = None
6666
planner_llm: Optional[BaseChatModel] = None
6767
planner_interval: int = 1 # Run planner every N steps
68-
is_planner_reasoning: bool = False # type: ignore
68+
is_planner_reasoning: bool = False # type: ignore
6969

7070

7171
class AgentState(BaseModel):

examples/notebook/agent_browsing.ipynb

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
},
99
"outputs": [],
1010
"source": [
11-
"\n",
1211
"%pip install -U langgraph langchain_google_genai langchain_community langgraph-checkpoint-postgres openai langchain_groq"
1312
]
1413
},

0 commit comments

Comments
 (0)