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
remove unneeded noqas
Nick Sweeting78148a96f973
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 92cc8ca59..ce52c5e5a 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -1,32 +1,58 @@repos:+ - repo: https://github.com/asottile/yesqa+ rev: v1.5.0+ hooks:+ - id: yesqa++ # - repo: https://github.com/codespell-project/codespell+ # rev: v2.4.1+ # hooks:+ # - id: codespell # See pyproject.toml for args+ # additional_dependencies:+ # - tomli++ # - repo: https://github.com/asottile/pyupgrade+ # rev: v3.19.1+ # hooks:+ # - id: pyupgrade++ # - repo: https://github.com/asottile/add-trailing-comma+ # rev: v3.1.0+ # hooks:+ # - id: add-trailing-comma+- repo: https://github.com/astral-sh/ruff-pre-commitrev: v0.11.2hooks:- id: ruff+ args: ["--fix", "--show-fixes"]- id: ruff-format# see pyproject.toml for more details on ruff config- repo: https://github.com/pre-commit/pre-commit-hooksrev: v5.0.0hooks:+ # check for basic syntax errors in python and data files+ - id: check-ast- id: check-toml- id: check-yaml- id: check-json- - id: end-of-file-fixer- id: check-merge-conflict- - id: check-illegal-windows-names- - id: check-case-conflict- - id: check-added-large-files- - id: check-shebang-scripts-are-executable+ # check for bad files and folders- id: check-symlinks- id: destroyed-symlinks- - id: detect-private-key+ - id: check-case-conflict+ - id: check-illegal-windows-names+ - id: check-shebang-scripts-are-executable- id: mixed-line-ending- id: fix-byte-order-marker-- - repo: https://github.com/codespell-project/codespell- rev: v2.4.1- hooks:- - id: codespell # See pyproject.toml for args- additional_dependencies:- - tomli+ - id: end-of-file-fixer+ # best practices enforcement+ - id: detect-private-key+ # - id: check-docstring-first+ - id: debug-statements+ - id: forbid-submodules+ - id: check-added-large-files+ args: ["--maxkb=600"]+ # - id: name-tests-test+ # args: ["--pytest-test-first"]diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 00200a989..42b1b460f 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1267,7 +1267,7 @@ class Agent(Generic[Context]):test_answer = 'paris'try:# dont convert this to async! it *should* block any subsequent llm calls from running- response = self.llm.invoke([HumanMessage(content=test_prompt)]) # noqa: RUF006+ response = self.llm.invoke([HumanMessage(content=test_prompt)])response_text = str(response.content).lower()if test_answer in response_text:diff --git a/browser_use/dom/tests/extraction_test.py b/browser_use/dom/tests/extraction_test.pyindex 940389ed7..5d3010429 100644--- a/browser_use/dom/tests/extraction_test.py+++ b/browser_use/dom/tests/extraction_test.py@@ -59,7 +59,7 @@ async def test_focus_vs_all_elements():# browser_binary_path='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',))- context = BrowserContext(browser=browser, config=config) # noqa: F821+ context = BrowserContext(browser=browser, config=config)websites = ['https://kayak.com/flights',