Skip to content

Releases: microsoft/pyright

Published 1.0.55

10 Aug 08:15
Compare
Choose a tag to compare

New Feature: Added 'reportUnnecessaryIsInstance' switch. When enabled, the type checker reports any cases where isinstance() is used and the result is provably always true or false. At best, these represent unnecessary runtime overhead and more commonly represent bugs.
Enhancement: Made a bunch of suggested improvements to the type completion provider in the VS Code extension.
Enhancement: Improved responsiveness of VS Code extension, especially when files are being analyzed in the background.
Enhancement: Added unreachable code reporting after 'break' statements.
Bug Fix: Improved type constraint logic when the 'continue' keyword is used within a loop.
Bug Fix: Added support for properties whose type is defined using a generic TypeVar type.

Published 1.0.54

09 Aug 06:26
Compare
Choose a tag to compare

Enhancement: Added special-case handling of __all__ assignments so referenced symbols are marked as accessed.
Enhancement: Added support for class declarations that include base classes that are declared in terms of a variable with a "Type[X]" type annotation.
Enhancement: Changed logic in type completion provider to sort suggestions such that dunder names (magic types) appear after other names (under the assumption that the former are more rare).
Bug Fix: Fixed bug in type completion logic that prevented members from super-classes from being included in the suggestion list.
Bug Fix: Fixed missing check in type constraint logic that resulted in an "internal error" when "is" operator was used with LHS expression that included an index.
Bug Fix: Added support in type checker for dictionary expansion entries in a dictionary literal expression.

Published 1.0.53

08 Aug 08:03
Compare
Choose a tag to compare

New Feature: Implemented NewType type support.
Enhancement: Improved type analyzer in case where class is passed in a context where a function is expected. The analyzer now synthesizes a function that corresponds to the class's constructor and/or init routine.
Enhancement: Added function documentation support in signature provider.
Enhancement: Made a bunch of suggested improvements to the completion provider including support for built-in types and selection details.
Bug Fix: Fixed bug in docstring processing where the entire docstring is on a single line.
Bug Fix: Fixed bug in type analyzer. It was incorrectly reporting that "yield" statements were not allowed in async functions. Only "yield from" should be flagged as errors.

Published 1.0.52

05 Aug 03:28
Compare
Choose a tag to compare

New Feature: Added "strictParameterNoneValue" rule.
New Feature: Improved type checking for raise and raise/from statements.
Bug Fix: Fixed handling of super() call. It now properly handles zero, one and two-arg versions. Also handles case where target class derives from multiple base classes.

Published 1.0.51

04 Aug 06:21
Compare
Choose a tag to compare

New Feature: Wildcard characters are now supported for include, exclude, ignore and strict path arrays in the config file. Supported wildcards include ** (matches against one or more directories), * (matches against zero or more characters), and ? (matches against a single character).
New Feature: Added config rule "reportCallInDefaultInitializer" that emits an error or warning when a function call is used within a parameter's default value initialization expression.

Published 1.0.50

29 Jul 01:21
Compare
Choose a tag to compare

New Feature: Implemented type checking for augmented assignment statements.
New Feature: Implemented minimal support for InitVar class used in dataclass declarations.

Published 1.0.49

24 Jul 17:50
Compare
Choose a tag to compare

Bug Fix: Added support in type checker for assignment expressions that target tuples that end in an unpack expression. The previous version simply crashed in this case, resulting in an "internal error" message.
Bug Fix: Fixed handling of multi-root workspaces in VS Code extension. The previous version assumed that workspace roots were always peer folders. It now handles nesting.

Published 1.0.48

21 Jul 23:22
Compare
Choose a tag to compare

Enhancement: Implemented more thorough type checking for assignments — especially assignments to member variables.
Bug Fix: Eliminated some redundant and inconsistent error messages relating to assignments. Added missing information to some error messages.
Bug Fix: Fixed issue that caused duplicate errors to appear for some conditions related to list comprehensions.

Published 1.0.47

19 Jul 17:52
Compare
Choose a tag to compare

New Feature: Added knowledge of built-in type ModuleType.
New Feature: Added support for per-folder settings in a multi-root workspace.

Published 1.0.46

18 Jul 14:41
Compare
Choose a tag to compare

Bug Fix: Fixed regression that caused crash in VS Code extension for some users. The regression was introduced as part of the new multi-root workspace support.