Skip to content

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

Add Pyright for check for show-stopper type errors

dha-aaaa0e5f4e6dc3
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 1d36417f0..b0cc852b7 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -12,6 +12,7 @@ jobs:
- run: uv run ruff check --no-fix --select PLE
- run: uv run ruff format
- run: uv run pre-commit run --all-files
+ - run: uv run pyright
# 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
diff --git a/pyproject.toml b/pyproject.toml
index b267e3bf5..8cfca277b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -67,6 +67,9 @@ quote-style = "single"
indent-style = "tab"
docstring-code-format = true
+[tool.pyright]
+typeCheckingMode = "off"
+
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
@@ -94,4 +97,5 @@ dev-dependencies = [
"ipdb>=0.13.13",
"pre-commit>=4.2.0",
"codespell>=2.4.1",
+ "pyright>=1.1.399",
]