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
add pyright to pre-commit hooks
Nick Sweetingfdba54fb34da
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex 43a878378..44949625d 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -29,6 +29,7 @@ jobs:- uses: astral-sh/setup-uv@v5with:enable-cache: true+ - run: uv sync --dev --all-extras # install extras for examples to avoid pyright missing imports errors- run: uv run pre-commit run --all-files --show-diff-on-failurelint-typecheck:@@ -39,5 +40,5 @@ jobs:- uses: astral-sh/setup-uv@v6with:enable-cache: true- - run: uv sync --dev --all-extras # install extras for examples to avoid pyright missing imports errors+ - run: uv sync --dev --all-extras # install extras for examples to avoid pyright missing imports errors-- run: uv run pyrightdiff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex dd9083eee..0daede158 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -29,6 +29,11 @@ repos:- id: ruff-format# see pyproject.toml for more details on ruff config+ - repo: https://github.com/RobertCraigie/pyright-python+ rev: v1.1.402+ hooks:+ - id: pyright+- repo: https://github.com/pre-commit/pre-commit-hooksrev: v5.0.0hooks:diff --git a/bin/lint.sh b/bin/lint.shindex 0b2d1bacc..57099ebac 100755--- a/bin/lint.sh+++ b/bin/lint.sh@@ -9,8 +9,5 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"cd "$SCRIPT_DIR/.." || exit 1-echo "[*] Running ruff linter, formatter, and other pre-commit lint checks..."-uv run pre-commit run --all-files--echo "[*] Running pyright type checker..."-exec uv run pyright+echo "[*] Running ruff linter, formatter, pyright type checker, and other pre-commit checks..."+exec uv run pre-commit run --all-filesdiff --git a/pyproject.toml b/pyproject.tomlindex 10b245460..487faa5ce 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -123,6 +123,8 @@ skip-magic-trailing-comma = false[tool.pyright]typeCheckingMode = "basic"exclude = ["tests/old/", ".venv/", ".git/", "__pycache__/", "./test_*.py", "./debug_*.py", "private_example/"]+venvPath = "."+venv = ".venv"[tool.hatch.build]