npm pyright 1.1.170
Published 1.1.170

latest releases: 1.1.389, 1.1.388, 1.1.387...
3 years ago

Bug Fix (from Pylance): Handle unrooted execution environments (e.g., open file mode), preventing various crashes and oddities.

Bug Fix (from Pylance): Generate default values in method overload signatures. Previously, we didn't include them, which generated the wrong signature.

Bug Fix (from Pylance): Use attribute docstrings for type aliases in completion and hover.

Bug Fix (from Pylance): Modify parser to change the range of parenthesized expressions to their contents. This improves the ranges returned in hovers, document highlight, etc.

Bug Fix: Improved member access logic to more faithfully match the Python interpreter's behavior when the member is assigned through a class, that member is a class itself, and that class has a metaclass that implements a descriptor protocol. It appears that the interpreter does not call through to the metaclass's __set__ method in this case, even though it does call its __get__ method when the member is accessed in the same circumstance.

Enhancement: Extended reportCallInDefaultInitializer diagnostic check to disallow list, set or dict expressions in default argument expression.

Bug Fix: Improved isinstance and issubclass narrowing to handle open-ended tuples passed as the second argument.

Bug Fix: Fixed false positive error when namedtuple constructor is called with a list of field names that includes dynamic (non-literal) expressions.

Bug Fix: Fixed false positive error where an exception class (as opposed to an exception object) is used in a "from" clause in a "raise" statement.

Enhancement: Added support for ParamSpec matching when used within a callback protocol. PEP 612 is unclear on whether this should be supported, by pyre (the reference implementation for the PEP) does support it.

Bug Fix: Fixed false negative error in parser where it did not correctly detect a syntax error when a walrus operator was used in a ternary operator condition expression.

Bug Fix: Fixed bug that resulted in false negative when bidirectional type inference involved an "expected type" of Any and the type being evaluated was a call expression that returned a generic object as a return value.

Bug Fix: Fixed infinite recursion bug in hover provider when a symbol referred to both a locally-defined class and an imported symbol.

Bug Fix: Fixed bug that resulted in false positive when using unpack operator with self when self refers to a named tuple or a tuple with known length.

Behavior Change: Allow symbols that are not explicitly re-exported from a stub to be imported into another stub. This change is required to support recent updates to typeshed.

Enhancement: Updated typeshed stubs to the latest.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.