# microsoft/pylance-release architecture

> Architecture diagram of the GitHub repository microsoft/pylance-release, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/pylance-release
- Repository: https://github.com/microsoft/pylance-release

## Overview

This is the public Pylance feedback repository, not the Pylance implementation: the README says Pylance is closed-source and directs core typing-engine contributions to Pyright. Its sampled Python files are scenario fixtures for language features, not runtime modules. The documented user flow is to install the VS Code Python extension, open a Python file, and have Pylance activate. Fixture paths below indicate the feature they exercise; they do not establish internal Pylance calls. Other README capabilities without corresponding files in the supplied tree are noted as documented-only.

Main entry points: [`testing/single/src/gotodef.py`](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/gotodef.py) (Go to definition), [`testing/single/src/gotodecl.py`](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/gotodecl.py) (Go to declaration), [`testing/single/src/goToImpl.py`](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/goToImpl.py) (Go to implementation), [`testing/single/src/findallreferences.py`](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/findallreferences.py) (Symbols and references)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Navigation fixtures"]
  node_go_definition["Go to definition<br/>[gotodef.py]"]
  node_go_declaration["Go to declaration<br/>[gotodecl.py]"]
  node_go_implementation["Go to implementation<br/>[goToImpl.py]"]
  node_symbols_refs["Symbols and references"]
  node_hierarchies["Type and call hierarchies<br/>[typeHierarchy.py]"]
end

subgraph group_editing["Editing fixtures"]
  node_rename_move["Rename and move<br/>[renameFiles.py]"]
  node_code_actions["Code actions<br/>[codeaction.py]"]
  node_formatting["Formatting<br/>[formatOnType.py]"]
  node_folding_selection["Folding and selection<br/>[foldingRange.py]"]
end

subgraph group_language["Language intelligence fixtures"]
  node_diagnostics["Diagnostics<br/>[diagnostics.py]"]
  node_completion["Completion and imports<br/>[completion.py]"]
  node_hover_signature["Hover and signatures<br/>[hover.py]"]
  node_docstrings["Docstrings<br/>[docstrings.py]"]
  node_semantic["Semantic tokens<br/>[semanticToken.py]"]
  node_inlay["Inlay hints<br/>[inlayHint.py]"]
  node_documented_only["Other documented capabilities"]
end

subgraph group_workspace["Workspace fixtures"]
  node_workspace_fixtures["Workspace and file fixtures"]
  node_loose_import["Loose import fixture<br/>[importer.py]"]
  node_outer_module["External import fixture<br/>[outerModule.py]"]
  node_user_module["Shared type fixture<br/>[userModule.py]"]
end

node_user(("Python developer"))
node_vscode["VS Code Python extension"]
node_pylance["Pylance language support"]

node_user -->|"installs"| node_vscode
node_user -->|"opens Python file"| node_pylance
node_vscode -->|"activates"| node_pylance
node_pylance -->|"offers"| node_go_definition
node_pylance -->|"offers"| node_go_declaration
node_pylance -->|"offers"| node_go_implementation
node_pylance -->|"offers"| node_symbols_refs
node_pylance -->|"offers"| node_hierarchies
node_pylance -->|"offers"| node_rename_move
node_pylance -->|"offers"| node_code_actions
node_pylance -->|"offers"| node_formatting
node_pylance -->|"offers"| node_folding_selection
node_pylance -->|"offers"| node_diagnostics
node_pylance -->|"offers"| node_completion
node_pylance -->|"offers"| node_hover_signature
node_pylance -->|"offers"| node_docstrings
node_pylance -->|"offers"| node_semantic
node_pylance -->|"offers"| node_inlay
node_pylance -->|"also offers"| node_documented_only

click node_go_definition "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/gotodef.py"
click node_go_declaration "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/gotodecl.py"
click node_go_implementation "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/goToImpl.py"
click node_symbols_refs "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/findallreferences.py"
click node_hierarchies "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/typeHierarchy.py"
click node_rename_move "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/renameFiles.py"
click node_code_actions "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/codeaction.py"
click node_formatting "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/formatOnType.py"
click node_folding_selection "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/foldingRange.py"
click node_diagnostics "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/diagnostics.py"
click node_completion "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/completion.py"
click node_hover_signature "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/hover.py"
click node_docstrings "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/docstrings.py"
click node_semantic "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/semanticToken.py"
click node_inlay "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/inlayHint.py"
click node_workspace_fixtures "https://github.com/microsoft/pylance-release/tree/main/testing/single/src"
click node_loose_import "https://github.com/microsoft/pylance-release/blob/main/testing/loose/importer.py"
click node_outer_module "https://github.com/microsoft/pylance-release/blob/main/testing/single/outsideLib/outerModule.py"
click node_user_module "https://github.com/microsoft/pylance-release/blob/main/testing/single/src/lib/userModule.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_go_definition,node_go_declaration,node_go_implementation,node_symbols_refs,node_hierarchies toneBlue
class node_rename_move,node_code_actions,node_formatting,node_folding_selection toneAmber
class node_diagnostics,node_completion,node_hover_signature,node_docstrings,node_semantic,node_inlay,node_documented_only toneMint
class node_workspace_fixtures,node_loose_import,node_outer_module,node_user_module toneRose
class node_user,node_vscode,node_pylance toneIndigo
```

## Components

### Navigation fixtures

- [Go to definition](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/gotodef.py): `testing/single/src/gotodef.py`
- [Go to declaration](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/gotodecl.py): `testing/single/src/gotodecl.py`
- [Go to implementation](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/goToImpl.py): `testing/single/src/goToImpl.py`
- [Symbols and references](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/findallreferences.py): `testing/single/src/findallreferences.py`
- [Type and call hierarchies](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/typeHierarchy.py): `testing/single/src/typeHierarchy.py`

### Editing fixtures

- [Rename and move](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/renameFiles.py): `testing/single/src/renameFiles.py`
- [Code actions](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/codeaction.py): `testing/single/src/codeaction.py`
- [Formatting](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/formatOnType.py): `testing/single/src/formatOnType.py`
- [Folding and selection](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/foldingRange.py): `testing/single/src/foldingRange.py`

### Language intelligence fixtures

- [Diagnostics](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/diagnostics.py): `testing/single/src/diagnostics.py`
- [Completion and imports](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/completion.py): `testing/single/src/completion.py`
- [Hover and signatures](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/hover.py): `testing/single/src/hover.py`
- [Docstrings](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/docstrings.py): `testing/single/src/docstrings.py`
- [Semantic tokens](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/semanticToken.py): `testing/single/src/semanticToken.py`
- [Inlay hints](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/inlayHint.py): `testing/single/src/inlayHint.py`
- **Other documented capabilities**

### Workspace fixtures

- [Workspace and file fixtures](https://github.com/microsoft/pylance-release/tree/main/testing/single/src): `testing/single/src`
- [Loose import fixture](https://github.com/microsoft/pylance-release/blob/main/testing/loose/importer.py): `testing/loose/importer.py`
- [External import fixture](https://github.com/microsoft/pylance-release/blob/main/testing/single/outsideLib/outerModule.py): `testing/single/outsideLib/outerModule.py`
- [Shared type fixture](https://github.com/microsoft/pylance-release/blob/main/testing/single/src/lib/userModule.py): `testing/single/src/lib/userModule.py`

### Other components

- **Python developer**
- **VS Code Python extension**
- **Pylance language support**

## Connections

- Python developer → VS Code Python extension: installs (evidence: `README.md`)
- Python developer → Pylance language support: opens Python file (evidence: `README.md`)
- VS Code Python extension → Pylance language support: activates (evidence: `README.md`)
- Pylance language support → Go to definition: offers (evidence: `README.md`)
- Pylance language support → Go to declaration: offers (evidence: `README.md`)
- Pylance language support → Go to implementation: offers (evidence: `README.md`)
- Pylance language support → Symbols and references: offers (evidence: `README.md`)
- Pylance language support → Type and call hierarchies: offers (evidence: `README.md`)
- Pylance language support → Rename and move: offers (evidence: `README.md`)
- Pylance language support → Code actions: offers (evidence: `README.md`)
- Pylance language support → Formatting: offers (evidence: `README.md`)
- Pylance language support → Folding and selection: offers (evidence: `README.md`)
- Pylance language support → Diagnostics: offers (evidence: `README.md`)
- Pylance language support → Completion and imports: offers (evidence: `README.md`)
- Pylance language support → Hover and signatures: offers (evidence: `README.md`)
- Pylance language support → Docstrings: offers (evidence: `README.md`)
- Pylance language support → Semantic tokens: offers (evidence: `README.md`)
- Pylance language support → Inlay hints: offers (evidence: `README.md`)
- Pylance language support → Other documented capabilities: also offers (evidence: `README.md`)
