pyright

Static Type Checker for Python

OTHER License

Downloads
2.3M
Stars
13.2K
Committers
119

Bot releases are visible (Hide)

pyright - Published 1.0.44

Published by erictraut over 5 years ago

New Feature: Type analyzer now infers a function return type of "NoReturn" if function doesn't return any value and always raises an exception. Methods marked @abstractmethod are exempt. An explicit return type annotation always overrides this inference.
Bug Fix: Fixed logic for try/except/else/finally statements to properly handle code flow analysis. The previous implementation was incorrectly identifying unreachable code.
Bug Fix: Type analyzer wasn't correctly inferring type of set when a set comprehension was used.

pyright - Published 1.0.43

Published by erictraut over 5 years ago

Enhancement: Improved handling of ellipsis.
Bug Fix: Fixed bug that resulted in constant redefinitions not to be flagged as errors if the original assignment had an explicit type annotation.
Bug Fix: Fixed bug that caused type completions to appear within certain string tokens.
Bug Fix: Allow generic type (e.g. Type[T]) to be used as the annotation for a callable parameter or variable.

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.