Files
Viper_VSCode/architecture/generated/pyright-engineering-map.md
TermiNexus e9e4693333
Some checks failed
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
初始化上传
2026-07-24 17:08:39 +08:00

12 KiB

Pyright Engineering Map

A maintainer map from Pyright concepts to implementation roots, tests, and graph pages. It uses LSP terminology where Pyright implements a protocol-facing language feature, and stays within packages/pyright-owned paths.

Quick Index

Type evaluation

User surface: Type inference, call analysis, overload selection, operator semantics, class and function type computation

LSP surface: textDocument/hover
textDocument/completion
textDocument/signatureHelp

Start in code:

Test starting points:

Related semantic areas:

Constraint solving and type variables

User surface: TypeVar solving, generic specialization, constrained types, variance, inference scoring

LSP surface: textDocument/hover
textDocument/signatureHelp
textDocument/completion

Start in code:

Test starting points:

Related semantic areas:

Flow narrowing and type guards

User surface: Control-flow graph, narrowing expressions, TypeGuard and TypeIs behavior, pattern narrowing

LSP surface: textDocument/hover
textDocument/publishDiagnostics

Start in code:

Test starting points:

Related semantic areas:

Import resolution and packaging

User surface: Module resolution, execution environments, editable installs, stub discovery, auto-import search

LSP surface: textDocument/completion
textDocument/definition
workspace/symbol

Start in code:

Test starting points:

Related semantic areas:

Parser, binder, and symbols

User surface: Python syntax tree parsing, binding, scopes, symbol tables, declaration discovery

LSP surface: textDocument/documentSymbol
textDocument/definition
textDocument/references

Start in code:

Test starting points:

Related semantic areas:

Diagnostics and configuration

User surface: Diagnostic rules, config files, execution environments, severity mapping, command-line analysis

LSP surface: textDocument/publishDiagnostics
workspace/didChangeConfiguration

Start in code:

Test starting points:

Related semantic areas:

Language service providers

User surface: Hover, completion, definition, references, rename, document symbols, semantic tokens

LSP surface: textDocument/hover
textDocument/completion
textDocument/definition
textDocument/references
textDocument/rename
textDocument/documentSymbol
textDocument/semanticTokens

Start in code:

Test starting points:

Related semantic areas:

CLI and VS Code extension

User surface: Pyright command-line entry point, VS Code extension integration, server startup, client configuration

LSP surface: initialize
shutdown
workspace/configuration

Start in code:

Test starting points:

Related semantic areas:

How to use this map

  • Start with the area that matches the behavior the user or protocol request exercises.
  • Follow the code links for implementation entry points, then use the test links to find the matching test shape.