github microsoft/pyright 1.1.36
Published 1.1.36

latest releases: 1.1.359, 1.1.358, 1.1.357...
3 years ago

Bug Fix: Fixed bug that caused auto-import to insert import statements in the wrong place when local typings stubs are used. These imports were treated as part of the local group rather than third-party.

Enhancement: Added support for @runtime_checkable decorator, as defined in PEP 544.

Enhancement: Implemented support for enum literals.

Enhancement: Implemented support for type narrowing for == or != comparisons for types that can be decomposed into a limited number of literals (bool and enum).

Enhancement: Updated heuristics that are used to determine which type to use for constructor calls. In some cases, it's preferable to use the specialized type derived from the call to __init__. Other times, it's preferable to use the type derived from the call to __new__.

New Feature: Added support for the upcoming PEP 604 alternative notation for unions.

Bug Fix: Fixed bug that caused incorrect error to be reported when assigning a value to an expression involving an index operator (e.g. a[x] = b) where the indexed value had a __setitem__ overload with an unannotated set of parameters.

Enhancement: Improved error messages related to argument matching. The message now includes the corresponding parameter name and function, which is sometimes not obvious from the context (e.g. in the case of operator overloads or other magic methods).

New Feature: Added support for python.analysis.extraPaths setting.

Enhancement: Accept minor versions in version_info when evaluating static expressions.

Enhancement: Added code to verify that resource manager type implements __exit__ or __aexit__ in addition to its enter counterpart.

Bug Fix: Fixed regression that caused diagnostics not to be cleared when closing a source file in the editor and openFilesOnly is enabled.

Bug Fix: Fixed bug in auto-import feature of type completion where imported module name included "-stubs" on the end if the symbol was resolved to a companion stub package.

Enhancement: Introduced reportUnboundVariable and reportUndefinedVariable diagnostic rules.

Bug Fix: Fixed bug that caused file changes not to trigger reanalysis in some cases.

Bug Fix: Special-cased FunctionType and LambdaType to avoid emitting false positives for the reportUnnecessaryIsInstance rule.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.