pyright/packages/vscode-pyright
2021-02-23 13:22:12 -07:00
..
build Convert repo into a lerna monorepo, add a validation workflow (#978) 2020-08-28 19:46:48 -07:00
images Convert repo into a lerna monorepo, add a validation workflow (#978) 2020-08-28 19:46:48 -07:00
schemas Added "reportOverlappingOverload" diagnostic rule, splitting out a few checks that were previously in the "reportGeneralTypeIssue" rule. This allows for finer-grained control over these overload checks. 2021-02-20 09:28:57 -07:00
src Update deps (TS 4.1, others), switch to LSP-native progress reporting (#1277) 2020-12-14 15:13:10 -08:00
.vscodeignore Convert repo into a lerna monorepo, add a validation workflow (#978) 2020-08-28 19:46:48 -07:00
CHANGELOG.md Convert repo into a lerna monorepo, add a validation workflow (#978) 2020-08-28 19:46:48 -07:00
package-lock.json Published 1.1.114 2021-02-23 13:22:12 -07:00
package.json Published 1.1.114 2021-02-23 13:22:12 -07:00
README.md Updated README to refer to PEP 586. (#1337) 2021-01-04 07:11:08 -08:00
tsconfig.json Update deps (TS 4.1, others), switch to LSP-native progress reporting (#1277) 2020-12-14 15:13:10 -08:00
tsconfig.withBaseUrl.json Update deps (TS 4.1, others), switch to LSP-native progress reporting (#1277) 2020-12-14 15:13:10 -08:00
webpack.config.js Update deps (TS 4.1, others), switch to LSP-native progress reporting (#1277) 2020-12-14 15:13:10 -08:00

Static type checker for Python

Speed

Pyright is a fast type checker meant for large Python source bases. It can run in a "watch" mode and performs fast incremental updates when files are modified.

Configurability

Pyright supports configuration files that provide granular control over settings. Different "execution environments" can be associated with subdirectories within a source base. Each environment can specify different module search paths, python language versions, and platform targets.

Type Checking Features

  • PEP 484 type hints including generics
  • PEP 526 syntax for variable annotations
  • PEP 544 structural subtyping
  • PEP 561 distributing and packaging type information
  • PEP 563 postponed evaluation of annotations
  • PEP 585 type hinting generics in standard collections
  • PEP 586 literal types
  • PEP 589 typed dictionaries
  • PEP 591 final qualifier
  • PEP 593 flexible variable annotations
  • PEP 604 complementary syntax for unions
  • PEP 612 parameter specification variables
  • PEP 613 explicit type aliases
  • PEP 647 user-defined type guards
  • Type inference for function return values, instance variables, class variables, and globals
  • Type guards that understand conditional code flow constructs like if/else statements

VS Code Language Features

The VS Code extension supports many time-saving language features including:

  • Intelligent type completion of keywords, symbols, and import names appears when editing
  • Import statements are automatically inserted when necessary for type completions
  • Signature completion tips help when filling in arguments for a call
  • Hover over symbols to provide type information and doc strings
  • Find Definitions to quickly go to the location of a symbols definition
  • Find References to find all references to a symbol within a code base
  • Rename Symbol to rename all references to a symbol within a code base
  • Find Symbols within the current document or within the entire workspace
  • View call hierarchy information — calls made within a function and places where a function is called
  • Organize Imports command for automatically ordering imports according to PEP8 rules
  • Type stub generation for third-party libraries

Built-in Type Stubs

Pyright includes a recent copy of the stdlib type stubs from Typeshed. It can be configured to use another (perhaps more recent or modified) copy of the Typeshed type stubs. Of course, it also works with custom type stub files that are part of your project.

For more details, refer to the README on the Pyright GitHub site.