"chore: migrate Pyright branding to Vipeye/vipeye across docs and tooling
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
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled

- Rewrite root README and docs for Vipeye
- Rename pyright-test-policy to vipeye-test-policy
- Update CI/Azure pipelines, perfCompare.py and package metadata
- Keep upstream links, external tool params and # pyright: ignore compat"
This commit is contained in:
TermiNexus committed 2026-08-07 03:33:29 +08:00
1 parent be9ff90d11
commit 44d83f4235
76 files changed
+930 -1013

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ assignees: ''
Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.
If you have a question about typing or a behavior that you’re seeing in Pyright (as opposed to a bug report or enhancement request), consider posting to the [Pyright discussion forum](https://github.com/microsoft/pyright/discussions).
If you have a question about typing or a behavior that you’re seeing in Vipeye (as opposed to a bug report or enhancement request), consider posting to the [Pyright discussion forum](https://github.com/microsoft/pyright/discussions).
**Describe the bug**
A clear and concise description of the behavior you are seeing and the expected behavior along with steps to reproduce it.
@@ -25,4 +25,4 @@ def foo(self) -> str:
If your code relies on symbols that are imported from a third-party library, include the associated import statements and specify which versions of those libraries you have installed.
**VS Code extension or command-line**
Are you running pyright as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?
Are you running vipeye as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?
+1 -1
View File
@@ -7,7 +7,7 @@ assignees: ''
---
If you have a question about a behavior that you’re seeing in pyright, consider posting to the [Pyright discussion forum](https://github.com/microsoft/pyright/discussions).
If you have a question about a behavior that you’re seeing in vipeye, consider posting to the [Pyright discussion forum](https://github.com/microsoft/pyright/discussions).
**Is your feature request related to a problem? Please describe.**
A clear and concise description of the problem.
+3 -3
View File
@@ -31,17 +31,17 @@ runs:
- uses: ./.github/actions/cfs-npm-authenticate
with:
working-directory: packages/pyright
working-directory: packages/vipeye
token: ${{ steps.npm-auth.outputs.token }}
- uses: ./.github/actions/cfs-npm-authenticate
with:
working-directory: packages/pyright-internal
working-directory: packages/vipeye-internal
token: ${{ steps.npm-auth.outputs.token }}
- uses: ./.github/actions/cfs-npm-authenticate
with:
working-directory: packages/vscode-pyright
working-directory: packages/vscode-vipeye
token: ${{ steps.npm-auth.outputs.token }}
- uses: ./.github/actions/cfs-npm-cache
+18 -18
View File
@@ -1,20 +1,20 @@
---
name: typeshed-update-agent
description: Updates Pyright bundled typeshed fallback and triages resulting test changes while preserving type precision.
description: Updates Vipeye bundled typeshed fallback and triages resulting test changes while preserving type precision.
---
# Typeshed Update Agent
This agent updates the typeshed version used by Pyright and ensures tests remain correct and precise.
This agent updates the typeshed version used by Vipeye and ensures tests remain correct and precise.
The agent must follow the **Pyright Test Policy**.
The agent must follow the **Vipeye Test Policy**.
---
# Phase 1 — Update Typeshed
1. Update the pinned typeshed commit or submodule.
2. Run the full Pyright test suite.
2. Run the full Vipeye test suite.
3. If all tests pass, create a PR titled:
Update typeshed to <commit>
@@ -25,7 +25,7 @@ Use the fork branch as the PR head if needed, and verify the reported PR URL is
## Running The Update Script
Use the repo script (from the Pyright repo root):
Use the repo script (from the Vipeye repo root):
```bash
python build/updateTypeshed.py
@@ -40,7 +40,7 @@ Notes:
- The script clones `https://github.com/python/typeshed.git` into a temporary directory.
- A local checkout of typeshed is not required to run the update.
- It updates `packages/pyright-internal/typeshed-fallback/` and writes the selected SHA to `packages/pyright-internal/typeshed-fallback/commit.txt`.
- It updates `packages/vipeye-internal/typeshed-fallback/` and writes the selected SHA to `packages/vipeye-internal/typeshed-fallback/commit.txt`.
- Do not spend token budget reviewing or summarizing the full generated `typeshed-fallback` diff; it is expected to be large and noisy. Use the pinned SHA, upstream compare links, and targeted file inspection only when tests fail or a specific behavior change needs triage.
## Upstream Investigation Guidance
@@ -51,7 +51,7 @@ When behavior changes are suspected, inspect upstream typeshed directly:
- compare SHAs: `https://github.com/python/typeshed/compare/<old_sha>...<new_sha>`
- specific PRs linked from changed files or commit history (for example dict constructor positional-only changes in `python/typeshed#15262`)
Always tie Pyright test changes to a concrete upstream typeshed commit or PR.
Always tie Vipeye test changes to a concrete upstream typeshed commit or PR.
---
@@ -62,7 +62,7 @@ If tests fail, the agent must classify each failure.
Possible categories:
A) Legitimate typeshed behavior change
B) Pyright bug revealed by new stubs
B) Vipeye bug revealed by new stubs
C) Test fragility (formatting / ordering)
D) Test harness or environment issue
@@ -107,11 +107,11 @@ Track changes including:
Run these focused tests before full-suite reruns when related files change.
- constructor callable and default constructor behavior:
- `cd packages/pyright-internal && npm run test:norebuild -- typeEvaluator6.test.ts -t "ConstructorCallable1|ConstructorCallable2|Constructor28" --runInBand`
- `cd packages/vipeye-internal && npm run test:norebuild -- typeEvaluator6.test.ts -t "ConstructorCallable1|ConstructorCallable2|Constructor28" --runInBand`
- contextmanager / generator behavior:
- `cd packages/pyright-internal && npm run test:norebuild -- typeEvaluator2.test.ts -t Solver7 --runInBand`
- `cd packages/vipeye-internal && npm run test:norebuild -- typeEvaluator2.test.ts -t Solver7 --runInBand`
- positional-only parameter behavior:
- `cd packages/pyright-internal && npm run test:norebuild -- typeEvaluator1.test.ts -t Call3 --runInBand`
- `cd packages/vipeye-internal && npm run test:norebuild -- typeEvaluator1.test.ts -t Call3 --runInBand`
---
@@ -119,7 +119,7 @@ Run these focused tests before full-suite reruns when related files change.
Preferred order:
1. Fix Pyright implementation
1. Fix Vipeye implementation
2. Patch incorrect typeshed stub
3. Update expected outputs (last resort)
@@ -132,7 +132,7 @@ Test updates must follow the **Precision Regression Rule**.
If type precision is reduced (e.g. `T → Unknown`):
1. Check whether a stub change caused the regression.
2. Attempt to restore precision via Pyright improvements.
2. Attempt to restore precision via Vipeye improvements.
3. If unavoidable, update tests **with justification**.
A regression report must be added to the PR.
@@ -140,7 +140,7 @@ A regression report must be added to the PR.
## Regression Guardrails
- Do not accept `T -> Unknown` precision drops without root-cause analysis.
- Do not update reveal expectations until checking whether a Pyright implementation fix can preserve precision.
- Do not update reveal expectations until checking whether a Vipeye implementation fix can preserve precision.
- If a reveal text changes due to upstream behavior, include the upstream commit/PR reference in the test update commit message or PR description.
---
@@ -150,7 +150,7 @@ A regression report must be added to the PR.
PR must include:
- typeshed commit bump
- Pyright fixes if needed
- Vipeye fixes if needed
- minimal test updates
- precision regression report (if applicable)
- explanation for each change
@@ -164,7 +164,7 @@ Include the following sections in the PR description:
- compare URL
2. Failure classification summary
- categories A/B/C/D with counts
3. Pyright fixes
3. Vipeye fixes
- files changed
- behavior restored
4. Test updates
@@ -182,7 +182,7 @@ Include the following sections in the PR description:
Preferred commits:
1. typeshed update
2. pyright fixes
2. vipeye fixes
3. justified test updates
Keeping these separate simplifies review.
@@ -203,4 +203,4 @@ Escalate early when any of these occur:
- constructor synthesis behavior changes in multiple unrelated samples
- new failures in both evaluator and language service suites from one stub change
- uncertainty about whether a fix belongs in Pyright versus upstream typeshed
- uncertainty about whether a fix belongs in Vipeye versus upstream typeshed
@@ -1,11 +1,11 @@
---
name: pyright-test-policy
description: Enforces Pyright test policy, preserving type precision and requiring justification for test changes.
name: vipeye-test-policy
description: Enforces Vipeye test policy, preserving type precision and requiring justification for test changes.
---
# Pyright Test Policy
# Vipeye Test Policy
Tests are the specification for Pyright behavior.
Tests are the specification for Vipeye behavior.
Agents must **not modify tests simply to make CI pass**.
@@ -18,7 +18,7 @@ The goal is to **preserve or improve type precision** unless a justified upstrea
Agents may modify tests only when one of the following is true:
1. A **typeshed stub change** legitimately alters the expected type.
2. A **Pyright diagnostic message format** changed but the semantic meaning is the same.
2. A **Vipeye diagnostic message format** changed but the semantic meaning is the same.
3. A test relied on unstable formatting or ordering.
---
@@ -49,11 +49,11 @@ These regressions are **allowed only with justification**.
- or an upstream typing change
2. **Reasoning**
- why Pyright cannot infer the previous precision
- why Vipeye cannot infer the previous precision
3. **Classification**
- A) typeshed became less precise
- B) Pyright limitation
- B) Vipeye limitation
- C) test fragility
- D) harness issue
@@ -81,7 +81,7 @@ without the justification process above.
Agents must attempt fixes in this order:
1. **Fix Pyright behavior**
1. **Fix Vipeye behavior**
2. **Fix incorrect typeshed stub**
3. **Adjust tests (last resort)**
+13 -13
View File
@@ -1,6 +1,6 @@
# Copilot Instructions for Pyright
# Copilot Instructions for Vipeye
Pyright is a static type checker for Viper, written in TypeScript. It ships as an npm CLI (`pyright`), an LSP language server (`pyright-langserver`), and a VS Code extension (`vscode-pyright`).
Vipeye is a static type checker for Viper, written in TypeScript. It ships as an npm CLI (`vipeye`), an LSP language server (`vipeye-langserver`), and a VS Code extension (`vscode-vipeye`).
## Build and Test
@@ -9,19 +9,19 @@ Pyright is a static type checker for Viper, written in TypeScript. It ships as a
npm install
# Build the core library
cd packages/pyright-internal && npm run build
cd packages/vipeye-internal && npm run build
# Run all tests (builds test server first)
cd packages/pyright-internal && npm test
cd packages/vipeye-internal && npm test
# Run all tests without rebuilding the test server (faster iteration)
cd packages/pyright-internal && npm run test:norebuild
cd packages/vipeye-internal && npm run test:norebuild
# Run a single test file
cd packages/pyright-internal && npx jest typeEvaluator1.test --forceExit
cd packages/vipeye-internal && npx jest typeEvaluator1.test --forceExit
# Run a single test by name
cd packages/pyright-internal && npx jest -t "Generic1" --forceExit
cd packages/vipeye-internal && npx jest -t "Generic1" --forceExit
# Build the CLI (webpack bundle)
npm run build:cli:dev
@@ -49,9 +49,9 @@ npm run fix:prettier
### Package Structure
- **`packages/pyright-internal`** — Core library: parser, binder, type evaluator, checker, language service. All logic lives here. This is the only package with tests.
- **`packages/pyright`** — CLI wrapper. Webpack-bundles `pyright-internal` into a distributable npm package with `pyright` and `pyright-langserver` entry points.
- **`packages/vscode-pyright`** — VS Code extension client that communicates with the language server.
- **`packages/vipeye-internal`** — Core library: parser, binder, type evaluator, checker, language service. All logic lives here. This is the only package with tests.
- **`packages/vipeye`** — CLI wrapper. Webpack-bundles `vipeye-internal` into a distributable npm package with `vipeye` and `vipeye-langserver` entry points.
- **`packages/vscode-vipeye`** — VS Code extension client that communicates with the language server.
### Analysis Pipeline
@@ -69,7 +69,7 @@ Source files are processed through these phases in order:
**Service → Program → SourceFile**: A `Service` manages a `Program`, which tracks `SourceFile` instances. The `Program` coordinates analysis ordering, prioritizing open editor files and their dependencies.
**Typeshed fallback**: `packages/pyright-internal/typeshed-fallback/` contains a bundled copy of typeshed stubs. This provides the Viper stdlib type stubs when no external typeshed is available.
**Typeshed fallback**: `packages/vipeye-internal/typeshed-fallback/` contains a bundled copy of typeshed stubs. This provides the Viper stdlib type stubs when no external typeshed is available.
**Localized diagnostics**: All user-facing diagnostic messages come from `localization/localize.ts`, not inline strings.
@@ -77,7 +77,7 @@ Source files are processed through these phases in order:
### Test Structure
Tests live in `packages/pyright-internal/src/tests/`. There are two main patterns:
Tests live in `packages/vipeye-internal/src/tests/`. There are two main patterns:
**Sample-based tests** (`typeEvaluator*.test.ts`, `checker.test.ts`):
- Each test calls `TestUtils.typeAnalyzeSampleFiles(['sampleName.py'])` to analyze a Viper file from `src/tests/samples/`.
@@ -96,7 +96,7 @@ Tests live in `packages/pyright-internal/src/tests/`. There are two main pattern
### Test Policy
Tests are the specification for Pyright behavior. Never modify tests just to make CI pass. Any change that makes types less precise (e.g., `T → Unknown`, `list[int] → list[Any]`, `Literal["x"] → str`) is a regression by default and requires explicit justification. See `.github/agents/pyright-test-policy.md` for details.
Tests are the specification for Vipeye behavior. Never modify tests just to make CI pass. Any change that makes types less precise (e.g., `T → Unknown`, `list[int] → list[Any]`, `Literal["x"] → str`) is a regression by default and requires explicit justification. See `.github/agents/vipeye-test-policy.md` for details.
## Code Style
+6 -6
View File
@@ -3,7 +3,7 @@ name: 'Build'
env:
NODE_VERSION: '22.x' # Shipped with VS Code.
ARTIFACT_NAME_VSIX: vsix
VSIX_NAME: vscode-pyright.vsix
VSIX_NAME: vscode-vipeye.vsix
on:
push:
@@ -12,7 +12,7 @@ on:
jobs:
build:
if: github.repository == 'microsoft/pyright'
if: github.repository == 'TermiNexus/Viper_VSCode'
runs-on: ubuntu-latest
name: Build
@@ -32,18 +32,18 @@ jobs:
- run: npm run install:all
- name: Build VSIX
working-directory: packages/vscode-pyright
working-directory: packages/vscode-vipeye
run: |
npm run package
mv pyright-*.vsix ${{ env.VSIX_NAME }}
mv vipeye-*.vsix ${{ env.VSIX_NAME }}
- uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME_VSIX }}
path: packages/vscode-pyright/${{ env.VSIX_NAME }}
path: packages/vscode-vipeye/${{ env.VSIX_NAME }}
create_release:
if: github.repository == 'microsoft/pyright'
if: github.repository == 'TermiNexus/Viper_VSCode'
runs-on: ubuntu-latest
name: Create release
needs: [build]
+8 -8
View File
@@ -1,6 +1,6 @@
# This workflow runs mypy_primer, a tool that runs pyright on a variety
# of open-source Python projects that are known to type check with pyright.
# It builds pyright from the latest PR commit and the merge base of the PR
# This workflow runs mypy_primer, a tool that runs vipeye on a variety
# of open-source Python projects that are known to type check with vipeye.
# It builds vipeye from the latest PR commit and the merge base of the PR
# and compares the output of both. It uploads the diffs as an artifact and
# creates a PR comment with the results (with the help of the
# mypy_primer_comment action).
@@ -8,8 +8,8 @@
# This workflow definition borrows liberally from the mypy repo. The original
# workflow was designed to work in a sharded manner where n copies of
# mypy_primer are started in parallel. Each instance runs 1/n of the projects.
# For now, we run only one instance because pyright is fast, and the number
# of projects that use pyright for type checking is small. To change this in
# For now, we run only one instance because vipeye is fast, and the number
# of projects that use vipeye for type checking is small. To change this in
# the future, change the 'shard_index' matrix to [0, 1, ..., n-1] and set
# 'num-shards' to n.
@@ -22,9 +22,9 @@ on:
# Run on the creation or update of a PR.
pull_request:
paths:
- 'packages/pyright/**'
- 'packages/pyright-internal/src/**'
- 'packages/pyright-internal/typeshed-fallback/**'
- 'packages/vipeye/**'
- 'packages/vipeye-internal/src/**'
- 'packages/vipeye-internal/typeshed-fallback/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+6 -6
View File
@@ -1,6 +1,6 @@
# This workflow runs mypy_primer, a tool that runs pyright on a variety
# of open-source Python projects that are known to type check with pyright.
# It builds pyright from the latest commit and the last release tag and
# This workflow runs mypy_primer, a tool that runs vipeye on a variety
# of open-source Python projects that are known to type check with vipeye.
# It builds vipeye from the latest commit and the last release tag and
# compares the output of both. It uploads the diffs as an artifact.
name: Run mypy_primer on push
@@ -13,9 +13,9 @@ on:
branches:
- main
paths:
- 'packages/pyright/**'
- 'packages/pyright-internal/src/**'
- 'packages/pyright-internal/typeshed-fallback/**'
- 'packages/vipeye/**'
- 'packages/vipeye-internal/src/**'
- 'packages/vipeye-internal/typeshed-fallback/**'
# Also run manually if requested.
workflow_dispatch:
+9 -9
View File
@@ -14,7 +14,7 @@ on:
jobs:
typecheck:
if: github.repository == 'microsoft/pyright'
if: github.repository == 'TermiNexus/Viper_VSCode'
runs-on: ubuntu-latest
name: Typecheck
@@ -34,7 +34,7 @@ jobs:
- run: npx lerna exec --stream --no-bail -- "tsc --noEmit"
style:
if: github.repository == 'microsoft/pyright'
if: github.repository == 'TermiNexus/Viper_VSCode'
runs-on: ubuntu-latest
name: Style
@@ -79,9 +79,9 @@ jobs:
- run: npm run install:all
- name: npm test (pyright-internal)
- name: npm test (vipeye-internal)
run: npm test
working-directory: packages/pyright-internal
working-directory: packages/vipeye-internal
# Install python so we can create a VENV for tests
- name: Use Python ${{env.PYTHON_VERSION}}
@@ -117,13 +117,13 @@ jobs:
CI_IMPORT_TEST_VENVPATH: '../../'
CI_IMPORT_TEST_VENV: '.venv'
run: npm run test:imports
working-directory: packages/pyright-internal
working-directory: packages/vipeye-internal
- name: Run import tests with pythonpath
env:
CI_IMPORT_TEST_PYTHONPATH: ${{env.python_venv_path}}
run: npm run test:imports
working-directory: packages/pyright-internal
working-directory: packages/vipeye-internal
build:
runs-on: ubuntu-latest
@@ -145,13 +145,13 @@ jobs:
- uses: ./.github/actions/choose-npm-install
- run: npm publish --dry-run
working-directory: packages/pyright
working-directory: packages/vipeye
- run: npm publish --dry-run
working-directory: packages/pyright-typeserver
working-directory: packages/vipeye-typeserver
- run: npm run package
working-directory: packages/vscode-pyright
working-directory: packages/vscode-vipeye
required:
runs-on: ubuntu-latest