pyright

Static Type Checker for Python

OTHER License

Downloads
2.3M
Stars
13.2K
Committers
119

Bot releases are hidden (Show)

pyright - Published 1.0.42

Published by erictraut over 5 years ago

New Feature: Support for callback protocols, as specified in PEP 544
New Feature: Class and function decorators now preserve generic functions rather than specializing them.
Bug Fix: Fixed bug in file system watch logic for config file. It was not detecting the case where the config file was deleted and recreated, as happens when switching branches in git.
Bug Fix: Normalize the root directory path provided by node so Windows command-line tool can find the typeshed fallback path.
Bug Fix: Type checker now preserves "Any" type for iterators, with statements, etc. rather than turning them into "unknown" types, which are reported in strict mode.

pyright - Published 1.0.41

Published by erictraut over 5 years ago

New Feature: Updated implementation of reportPrivateUsage check to differentiate between protected class members (single underscore) and private class members (double underscore).
Bug Fix: Untyped function or class decorator was not fully evaluated, so arguments passed to the decorator were not marked as accessed.
Bug Fix: Slice operator should accept None as argument.
Bug Fix: Add missing declared type for "self" or "cls" parameters in methods so the hover provider reports the correct inferred type.

pyright - Published 1.0.40

Published by erictraut over 5 years ago

New Feature: Support for f-strings
Bug Fix: Extraneous tokens in comment-style annotations were not previously reported as an error

pyright - Published 1.0.39

Published by erictraut over 5 years ago

New Feature: Added "strict" setting in config file. Files and directories that are specified in this array are analyzed with "strict" type checking rules.
Bug Fix #148: Removed check for private member declarations within dataclass. I originally misinterpreted the spec and added this check in error.
Bug Fix: Fixed bug in parser. Chains of binary operations were not grouping correctly. They should group left to right, not right to left.

pyright - Published 1.0.38

Published by erictraut over 5 years ago

New Feature: Added support for __future__ import annotations, which tells the python interpreter not to evaluate annotations at runtime.
Bug Fix #145: Type analyzer was not properly handling the special-case built-in class "auto" defined in Enum.pyi.

pyright - Published 1.0.37

Published by erictraut over 5 years ago

Bug Fix: Type checker was not validating the "from" clause of a "raise" statement.
Enhancement: Improved type checker performance by about 15%.

pyright - Published 1.0.36

Published by erictraut over 5 years ago

Bug Fix #141: The VS Code extension no longer automatically analyzes all files under the project if there's no pyrightconfig.json file present. It still analyzes python files that are explicitly opened in the editor.
Bug Fix #140: Targets of a "raise" statement should be marked as "accessed" for the purposes of displaying unused code.
Bug Fix: Added support for iterable classes like Enum.
Bug Fix: Fixed bug that caused type checker to fail to report errors in cases where a class was being instantiated with incorrect parameters and the initializer method was overloaded.

pyright - Published 1.0.35

Published by erictraut over 5 years ago

New Feature: Added "Find References" functionality to VS Code extension. You can now right click on a symbol and choose "Find All References" (or press option-shift-F12) to display all uses of the symbol within the code base.
Bug Fix: Fixed type constraint logic for assert statements that provide a message string parameter.

pyright - Published 1.0.34

Published by erictraut over 5 years ago

New Feature: Implemented "signature help" in VS Code extension that provides detailed signature information as popup text when adding parameters to a call.
New Feature: Added doc string support for modules, classes, methods, and functions. These are now displayed when you hover over a symbol.
Enhancement: Improved formatting for hover text in VS Code extension.
New Feature: Type completion support in VS Code extension for imports and import symbols.
New Feature: Reporting of unused symbols imported using "import X from Y" statements.

pyright - Published 1.0.33

Published by erictraut over 5 years ago

New Feature: Added support for new config options: reportUnusedImport, reportUnusedClass, reportUnusedFunction, and reportUnusedVariable.
New Feature: Added support for Enum functional declarations.
Bug Fix #134: Fixed bug where index into an enum type was generating a false positive error.
Bug Fix: Improved responsiveness of VS Code Extension during analysis.
Bug Fix #135: Fixed bug that resulted in false positive error being generated for __init__ calls in a base class.
Bug Fix: Fixed bug in path processing that caused VS Code Extension to report errors with corrupt file paths when the pyrightconfig.json file "include" array was empty.
Bug Fix: Fixed bug that caused symbols used as indexes not to be marked as "accessed" for purposes of highlighting unaccessed variables.
Bug Fix: Module-level variables (non-imports) and class-level variables should be marked as "not accessed" only if they're private (start with underscore).

pyright - Published 1.0.32

Published by erictraut over 5 years ago

Bug Fix #133: Add support for class keyword arguments
Bug Fix: Add support for qualname on classes

pyright - Published 1.0.31

Published by erictraut over 5 years ago

New Feature: Added more flexible file-level overrides for config settings. You can now specify individual config settings in a #pyright comment. See documentation for more details.

pyright - Published 1.0.30

Published by erictraut over 5 years ago

Bug Fix #132: Fixed code flow logic used for try/except/else statements so it properly handles returns from all paths.
Bug Fix: Fixed bug in type analyzer's handling of variables declared within methods that are cleared within an enum class.
Enhancement: Improved error reporting for arg type mismatches. Parameter name is now included in the error message.

pyright - Published 1.0.29

Published by erictraut over 5 years ago

New Feature: Added logic to avoid unnecessary reanalysis of files when a file is deleted, added or renamed (e.g. when using git to switch between branches).
Bug Fix: Fixed bug in binary operator type checking that caused false positive errors.
Bug Fix: Fixed several bugs in path processing for include directories.

pyright - Published 1.0.28

Published by erictraut over 5 years ago

New Feature: Added new config settings "strictListInference" and "strictDictionaryInference".
Bug Fix: Improved error reporting for union type mismatches.
Bug Fix #124: Fixed path/URI parsing logic for Windows that resulted in import failures.
Bug Fix: Fixed bug in type analyzer where it wasn't doing proper type variable matching in some cases.
Bug Fix: Exit code of 0 is reported if only errors (not warnings) are reported. Thanks to @higosh for the contribution!

pyright - Published 1.0.27

Published by erictraut over 5 years ago

New Feature: In the VS Code extension, added automatic detection and reporting of accessed local variables, parameters, imports, private methods and private class variables. They appear as "gray" in the editor.
New Feature: Entries defined in NamedTuple or namedtuple now work with the "show definition" feature in VS Code.
New Feature: Added "reportConstantRedefinition" feature, which reports any attempt to redefine a variable that is named in all-caps.
Bug Fix: Fixed code flow analysis bug relating to try/except/else statements.
Bug Fix #123: breakpoint function was being incorrectly excluded from the builtins namespace.

pyright - Published 1.0.26

Published by erictraut over 5 years ago

New Feature: Added "reportIncompatibleMethodOverride" config switch for reporting method overrides that are incompatible with the base class.
New Feature: Changed VS Code extension to use the root execution path of the project as the implicit include if no other include file specs are provided.
New Feature: Added support for the TYPE_CHECKING variable defined in typing.pyi.
New Feature: Added "--version" switch to command line - contribution by Oleg Butuzov.
Bug Fix #120: An import within a conditional statement was being reported as an "unbound" variable.
Bug Fix: Fixed issue where strict type mode was resulting in an indication that a local variable was unknown in some loops.
Bug Fix: When filling in missing type arguments for a generic class, use the specialized version of the TypeVar rather than Any.
Bug Fix: A "break" statement within a conditional statement was not being propagated up to the loop scope, resulting in incorrect code flow analysis.
Bug Fix: Improved type combining logic - literals are now elided when combined with non-literal of the same type.

pyright - Published 1.0.25

Published by erictraut over 5 years ago

New Feature: Extended type constraint logic for isinstance calls that pass a tuple of types for the second parameter.
New Feature: Improved definition provider ("show definitions") to handle multiple declarations. This occurs when overrides are used and when a member is declared in different places for types in a union.
New Feature: Types used for TypeVar bound and constraint types are now validated to ensure that they are not generic (i.e. use other TypeVars).
New Feature: Implemented proper type inference for dictionary literals that use list comprehensions.
New Feature: Annotated types for function parameters are now enforced, so an attempt to reassign the parameter will generate an error if the assigned value doesn't match the annotated type.
Bug Fix: Fixed reported bug with specialized type aliases.
Bug Fix: Type constraint logic was not properly handling the case where an assignment targeted a property.
Bug Fix: Imports of the form "from . import X" are now properly checked, and an error is reported if X doesn't exist.

pyright - Published 1.0.24

Published by erictraut over 5 years ago

New Feature: Type checker now honors type annotations on *args and **kwargs function parameters.
New Feature: Changed the way assignments are handled when the target of the assignment has a declared type. The type checker now uses the source (RHS) of the assignment to constrain the declared type if it is a union.
Bug Fix: Unbound or potentially-unbound variables are once again flagged as such.
Bug Fix: Fixed type inference for instantiation of generic class based on arguments passed to its constructor or init routine.
Bug Fix: Fixed several bugs relating to list comprehension type analysis.
Bug Fix: Fixed code flow analysis logic for for/else statements.
Bug Fix: Arguments with a literal type need to be "genericized" before performing type var matching on generic functions.
Bug Fix: Literal types with a value of 0 or empty string were not being printed as a literal in error messages.
Bug Fix: Fixed another bug in the datetime.pyi typeshed stub file relating to the datetime.combine method.
Bug Fix: Fixed a bug in the builtins.pyi typeshed stub file in the tuple.__add__ method. It required that the parameter be of the same tuple type.

pyright - Published 1.0.23

Published by erictraut over 5 years ago

New Feature: Added support for Literal type in typing_extensions.
New Feature: Added typing_extensions.pyi fallback type stub file.
New Feature: Types for arg and kwarg parameters are now correctly inferred to be of type List[X] and Dict[str, X] where X is either specified by the type annotation or assumed to be Unknown.
New Feature: Added type constraint logic for expressions of the form "type(X) is Y" and "type(X) is not Y".
New Feature: Added validation for ClassVar parameters to ensure that it doesn't contain any type variables.
Bug Fix: Fixed bug in "datetime.combine" method in datetime.pyi typeshed type stub.
Bug Fix: Type checker was not properly handling assignments where the LHS was a tuple and the RHS was an utterable type.
Improved responsiveness of VS Code extension.