npm pyright 1.1.100
Published 1.1.100

latest releases: 1.1.370, 1.1.369, 1.1.368...
3 years ago

Bug Fix: Fixed bug that caused "Type" with no type argument not to be flagged as an error.

Enhancement: Changed pythonPlatform to accept a value of "All" in which case no particular platform will be used over the others.

Bug Fix: Fixed bug that caused improper error when using "self" in a "raise ... from self" statement.

Bug Fix: Fixed bug that caused false negative when using a generic type alias with no type arguments.

Bug Fix: Added cache for logic that determines whether a context manager swallows exceptions (and hence acts like a try/except statement). This cache not only improves performance of code flow walks but also prevents infinite recursion in rare cases.

Behavior Change: Improved handling of unannotated decorator functions. If the decorator returns a function that accepts only *args and **kwargs (which is common), the type checker now assumes that the decorated function or method's signature is unmodified by the decorator. This preserves the original signature and docstring.

Bug Fix: Fixed bug that caused types within a "finally" clause to be evaluated incorrectly in situations where the "try" and all "except" and "else" clauses returned, raised, or broke.

Enhancement: Changed error messages that refer to "named" parameters and arguments to "keyword", which is more standard for Python.

Bug Fix: Fixed bug in declaration provider where the declaration of a member wasn't properly resolved when the LHS of the member access was a call to a function that returns a Type[X].

Bug Fix: Fixed bug that manifest as a problem with enums but was actually a problem in handling the circular dependency between "type" and "object" classes (since "type" is an object and "object" is a type).

Bug Fix: Fixed bug that caused incorrect type evaluation when a class was assigned to a generic protocol that was satisfied by the class's metaclass if the class also derived from a base class that also satisfied the same protocol.

Enhancement: Added code to test for missing annotation in Annotated.

Bug Fix: Fixed false negative where a union type was assigned to a constrained type variable. An error should be generated in this situation.

Enhancement: Added additional validation for TypeVar scoping. If an outer class defines the scope for a type var, functions and variables within an inner class cannot use a TypeVar of the same name.

Bug Fix: Improved handling of "py.typed" for namespace packages and packages with submodules.

Enhancement: Added support for __index__ magic method when used with __getitem__ or __setitem__ magic methods.

Enhancement: Added support for matching modules against protocols as specified by PEP 544.

Bug Fix: Fix for missing docs in completion list due to only checking the setter for docs because its definition comes after the getter.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.