How python/typeshed works
Typeshed is a repository of Python type annotations, not a type checker: it supplies stubs that type checkers use for analysis, inference, and autocompletion. The main workflow is a developer using a checker, which consumes bundled standard-library and builtin stubs, plus separately installed third-party stubs where needed. The README also identifies _typeshed as a standard-library utility package. Source excerpts chiefly cover contributor utilities, so relationships and capabilities beyond those documented in the README are not inferred from unsampled implementation.
Main entry points: stdlib Standard library · stubs Third-party packages
Components 9
Stub data
- Standard library
stdlib - Builtins
stdlib - _typeshed utilities
stdlib/_typeshed - Third-party packages
stubs
Repository utilities
- Stub metadata
lib/ts_utils/metadata.py - Repository paths
lib/ts_utils/paths.py
Stub consumption
- Type checker
- Analysis and completion
Other components
- Developer
Connections 5
- Developer → Type checker: uses
README.md - Type checker → Standard library: uses bundled stubs
README.md - Type checker → Builtins: uses bundled stubs
README.md - Type checker → Third-party packages: uses installed stubs
README.md - Type checker → Analysis and completion: supports
README.md