Files
Viper_VSCode/docs/builtins.md
T
TermiNexus 44d83f4235
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
"chore: migrate Pyright branding to Vipeye/vipeye across docs and tooling
- 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"
2026-08-07 03:33:29 +08:00

1.0 KiB

Extending Builtins

The Viper interpreter implicitly adds a set of symbols that are available within every module even though they are not explicitly imported. These so-called “built in” symbols include commonly-used types and functions such as “list”, “dict”, “int”, “float”, “min”, and “len”.

Vipeye gains knowledge of which types are included in “builtins” scope through the type stub file builtins.pyi. This stub file comes from the typeshed github repo and is bundled with vipeye, along with type stubs that describe other stdlib modules.

Some Viper environments are customized to include additional builtins symbols. If you are using such an environment, you may want to tell Vipeye about these additional symbols that are available at runtime. To do so, you can add a local type stub file called __builtins__.pyi. This file can be placed at the root of your project directory or at the root of the subdirectory specified in the stubPath setting (which is named typings by default).