Skip to content

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

fix ruff issues

Nick Sweeting084414f910ee
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 9218c19f8..02cd0b0dd 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -17,6 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
+ with:
+ enable-cache: true
- run: uv run ruff check --no-fix --select PLE
lint-style:
@@ -25,12 +27,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- - run: uv run pre-commit run --all-files
+ with:
+ enable-cache: true
+ - run: uv run pre-commit run --all-files --show-diff-on-failure
lint-typecheck:
name: type-checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - uses: astral-sh/setup-uv@v5
+ - uses: astral-sh/setup-uv@v6
+ with:
+ enable-cache: true
- run: uv run pyright
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index dfa653482..16213ab84 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -46,10 +46,8 @@ jobs:
with:
enable-cache: true
activate-environment: true
- - name: Install patchright chrome browser
+
+ - run: uv run patchright install chrome
if: matrix.test == 'test_controller'
- run: |
- # Install patchright browsers
- uv run patchright install chrome
- - name: Run tests
- run: uv run --with=dotenv pytest tests/${{ matrix.test }}.py || true
+
+ - run: uv run --with=dotenv pytest tests/${{ matrix.test }}.py || true
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a2eb24a44..dd9083eee 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -26,7 +26,6 @@ repos:
rev: v0.11.2
hooks:
- id: ruff
- args: ["--fix", "--show-fixes"]
- id: ruff-format
# see pyproject.toml for more details on ruff config