Help us improve
Share bugs, ideas, or general feedback.
From python-plugin
Configures Basedpyright for strict static type checking in Python projects, including installation via uv/pipx, pyproject.toml setup, LSP integration, and comparisons to Pyright/mypy.
npx claudepluginhub laurigates/claude-plugins --plugin python-pluginHow this skill is triggered — by the user, by Claude, or both
Slash command
/python-plugin:basedpyright-type-checkinghaikuThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Basedpyright is a fork of Pyright with additional features and stricter defaults, designed for maximum type safety and performance.
Performs Python type checking with ty, Astral's fast type checker (10-100x faster than mypy/Pyright). Configures rules in pyproject.toml and sets up projects with uv or pip.
Guides Python type hints, mypy static checking with configs, modern syntax, and advanced features like Protocol, TypedDict, Generics for type-safe code.
Type checks Python code using ty (Astral's Rust-based type checker and LSP). Useful for fast static analysis, migration from mypy/pyright, and setting up Python type checking in editors.
Share bugs, ideas, or general feedback.
Basedpyright is a fork of Pyright with additional features and stricter defaults, designed for maximum type safety and performance.
| Use this skill when... | Use another tool instead when... |
|---|---|
| Setting up type checking for Python | Formatting code (use ruff format) |
| Configuring strict type validation | Linting for style issues (use ruff check) |
| Comparing type checkers (basedpyright vs mypy) | Detecting unused code (use vulture/deadcode) |
| Setting up LSP for type-aware editor support | Running tests (use pytest) |
# Install globally
uv tool install basedpyright
# Install as dev dependency
uv add --dev basedpyright
# Run with uv
uv run basedpyright
pipx install basedpyright
# Check entire project
basedpyright
# Check specific files/directories
basedpyright src/ tests/
# Watch mode for development
basedpyright --watch
# Output JSON for tooling integration
basedpyright --outputjson
# Verbose diagnostics
basedpyright --verbose
[tool.basedpyright]
typeCheckingMode = "strict"
pythonVersion = "3.12"
include = ["src"]
exclude = ["**/__pycache__", "**/.venv"]
# Basedpyright-specific strict rules
reportUnusedCallResult = "error"
reportImplicitStringConcatenation = "error"
reportMissingSuperCall = "error"
reportUninitializedInstanceVariable = "error"
| Mode | Description | Use Case |
|---|---|---|
off | No type checking | Legacy code, migration start |
basic | Basic type checking | Gradual typing adoption |
standard | Standard strictness | Most projects (default Pyright) |
strict | Strict type checking | Type-safe codebases |
all | Maximum strictness | High-assurance systems |
# Start with basic mode
[tool.basedpyright]
typeCheckingMode = "basic"
include = ["src/new_module"] # Type check new code only
# Gradually expand
include = ["src/new_module", "src/api"]
# Eventually enable strict mode
typeCheckingMode = "strict"
include = ["src"]
| Factor | Basedpyright | Pyright | mypy |
|---|---|---|---|
| Speed | Fastest | Fastest | Slower |
| Strictness | Strictest defaults | Configurable | Configurable |
| LSP Support | Built-in | Built-in | Via dmypy |
| Plugin System | Limited | Limited | Extensive |
Choose Basedpyright for maximum type safety with stricter defaults and fastest speed. Choose Pyright for Microsoft's official support and VS Code Pylance compatibility. Choose mypy for extensive plugin ecosystem (django-stubs, pydantic-mypy).
# Inline type ignore
result = unsafe_operation() # type: ignore[reportUnknownVariableType]
# Function-level ignore
def legacy_function(): # basedpyright: ignore
pass
| Context | Command |
|---|---|
| Quick check | basedpyright |
| JSON output | basedpyright --outputjson |
| Watch mode | basedpyright --watch |
| CI check | uv run basedpyright |
| Verbose | basedpyright --verbose |
| Flag | Description |
|---|---|
--watch | Watch mode for development |
--outputjson | JSON output for tooling |
--verbose | Verbose diagnostics |
--pythonversion X.Y | Override Python version |
--level <mode> | Override type checking mode |
For detailed configuration options, LSP integration, migration guides, CI setup, and best practices, see REFERENCE.md.