Skip to content

Published 1.1.84

Compare
Choose a tag to compare
@erictraut erictraut released this 08 Nov 21:26

Bug Fix: Fixed parser crash when an f-string contained an empty expression.

Bug Fix: Fixed bug that caused diagnostics with "information" severity to be reported as "warnings" in the CLI version of pyright.

Bug Fix: Fixed recent regression in handling type evaluations for "and" and "or" operators. Short-circuiting evaluation was not handled correctly in some cases.

Bug Fix: Fixed bug in parser that caused expressions within f-strings to be handled incorrectly if they contained syntax errors.

Bug Fix: Fixed bug in parsing of annotated variable assignments. It was not allowing yield expressions on the right-hand side.

Enhancement: Added special-case logic to handle isinstance call when the first argument is a TypedDict and the second argument is a dict class. A TypedDict does not derive from dict from the perspective of type checking, but at runtime, isinstance returns True. This affects both type narrowing logic and checks for unnecessary isinstance calls.

Bug Fix: Fixed bug in type narrowing logic for expressions of the form "type(x) is y" or "type(x) is not y". The logic was incorrectly narrowing the type in the negative ("else") case. And in the positive case, it was not properly handling cases where x was a subclass of y.

Bug Fix: Fixed bug that caused completion suggestions to be presented when typing a period within a comment on the first line of the file.

Enhancement: Improved signature help for data classes where default values are specified.

Bug Fix: Fixed bug in NamedTuple logic that caused spurious errors when attempting to assign a NamedTuple to a Tuple with a compatible set of type arguments.