Install
$ agentstack add skill-tangledgroup-tangled-skills-basedpyright-1-39-8 ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
basedpyright 1.39.8
Overview
basedpyright is a fork of pyright that provides stricter defaults, new diagnostic rules, baseline support for incremental adoption, and re-implements Pylance-exclusive features in open-source. It ships as a PyPI package (basedpyright), making it easy to install alongside Python tooling without needing Node.js.
Key differences from upstream pyright:
- Default
typeCheckingModeis"recommended"(all rules enabled as warnings/errors) - New diagnostic rules:
reportAny,reportExplicitAny,reportInvalidCast,reportUnsafeMultipleInheritance, and more - Baseline support — adopt strict checks incrementally without fixing all existing errors first
- Built-in GitHub Actions annotations and GitLab code quality reports
- Pylance features (Jupyter, inlay hints, semantic highlighting, import suggestions) available to all LSP clients
enableTypeIgnoreCommentsdisabled by default; prefer# pyright: ignore[rule]- Defaults
pythonPlatformto"All"instead of the current OS - Auto-detects
.venvat project root as the Python environment - Exits with code 3 on invalid configuration (pyright silently ignores bad settings)
Usage
Installation
# Via uv (recommended)
uv add --dev basedpyright
# Or globally
uv tool install basedpyright
# Via pip
pip install basedpyright
Running the CLI
# Basic type check
basedpyright
# With verbose import resolution logs
basedpyright --verbose
# JSON output (for CI parsing)
basedpyright --outputjson
# Watch mode
basedpyright --watch
# Multi-threaded (experimental)
basedpyright --threads
# Baseline: write current errors to baseline
basedpyright --writebaseline
Configuration
Place a pyrightconfig.json at the project root, or add a [tool.basedpyright] section to pyproject.toml. A config file always takes precedence over language server settings.
Minimal config:
{
"include": ["src"],
"exclude": ["**/node_modules", "**/__pycache__"]
}
See reference files for full configuration options.
Gotchas
typeCheckingMode: "recommended"is the default — unlike pyright's"basic", all diagnostic rules are enabled. Less severe rules are warnings, butfailOnWarningsdefaults totrue, so the CLI exits non-zero on any warning. SetfailOnWarnings: falseif you only want hard errors to fail CI.
enableTypeIgnoreCommentsis disabled by default —# type: ignorecomments are ignored. Use# pyright: ignore[ruleName]instead, which requires specifying the rule and is safer. If migrating from pyright, you may need to replacetype: ignorecomments or enable the setting.
pythonPlatformdefaults to"All"— basedpyright assumes your code runs on any OS, not just the current one. This catches platform-specific type issues earlier but may surface false positives if your code is truly platform-specific. Override with"Linux","Darwin", or"Windows"as needed.
- Baseline file is auto-updated — when errors are fixed, the baseline file (
.basedpyright/baseline.json) is automatically updated to remove them. In CI, baseline defaults to lock mode (never writes). Use--writebaselineto intentionally update, or--baselinemode=autoto force local behavior in CI.
- Config errors exit with code 3 — typos in config keys cause a hard failure, unlike pyright which silently ignores them. This is intentional but can be surprising when migrating configs from pyright (e.g.,
mode→typeCheckingMode).
reportAnycatches allAnyusage — this new rule fires on expressions typed asAny, including explicitAnyannotations that the olderreportUnknown*rules miss. UseallowedUntypedLibrariesto suppress for specific third-party modules.
--venvpathis discouraged — basedpyright auto-detects.venvat project root. Use--pythonpathpointing to the interpreter instead, which is more robust.
reportInvalidCastflagsdict→TypedDictcasts — casting a regulardictto aTypedDicttriggers this rule because type checkers treat them as unrelated types. Narrow with runtime checks or use# pyright: ignore[reportInvalidCast].
strictGenericNarrowingchangesisinstancenarrowing — when enabled,isinstance(x, list)narrows tolist[object]instead oflist[Unknown]. This is more accurate but may surface new errors in code that relied on the looser behavior.
References
- [01-installation-and-setup](references/01-installation-and-setup.md) — Installation methods, IDE configuration, language server setup
- [02-configuration](references/02-configuration.md) — Config files, environment options, execution environments, CLI flags
- [03-diagnostic-rules](references/03-diagnostic-rules.md) — All diagnostic rules organized by category with default severities
- [04-basedpyright-specific-features](references/04-basedpyright-specific-features.md) — New rules, baseline, better defaults, pylance features, CI integration
- [05-type-system](references/05-type-system.md) — Type concepts, inference, narrowing, generics, type guards
- [06-import-resolution-and-stubs](references/06-import-resolution-and-stubs.md) — Import resolution order, type stubs, editable installs
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: tangledgroup
- Source: tangledgroup/tangled-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.