Published 1.1.216
Bug Fix: Fixed recent regression that resulted in a crash (stack overflow) in the code flow engine.
Bug Fix: Fixed a bug that resulted in unknown types in member access expressions to go unreported with reportUnknownMemberType
was enabled. This occurred when the member access expression was located within a subscript of an index expression.
Performance: Changed the logic that infers a NoReturn type to avoid inferring symbol types. This was causing a bunch of extra work to be performed in complex unannotated code bases like sklearn.
Performance: Fixed performance issue in parser for deeply-nested parenthesized expressions.
Bug Fix: Fixed bug in callable type compatibility logic. It was not properly handling some edge cases where a keyword parameter in the source and destination had an incompatible type if one or both of the types were specialized.
Bug Fix: Fixed a bug that resulted in false positives when specializing a callback protocol with a TypeVarTuple when the callback protocol also contained one or more keyword parameters that were generic.
Bug Fix: Fixed a bug in the protocol invariance checking logic. It wasn't properly handling protocols that used a TypeVarTuple as a type parameter that wasn't last (right-most) in the type parameter list.
Behavior Change: Changed import resolution order to more closely match PEP 561. Typeshed stdlib type stubs are now resolved later in the import resolution process, after all local modules and modules within the python environment.
Published 1.1.215
Bug Fix: Fixed bug that resulted in crash when extremely large integer literals are encountered.
Bug Fix: Fixed bug that caused "extraPaths" specified for individual execution environment to be combined for all execution environments if a default "extraPaths" was also specified in the same config file.
Bug Fix: Fixed handling of NoReturn
type, which should act like Never
in that both are considered "bottom types" and are assignable to any other type.
Enhancement: Updated typeshed stubs to the latest.
Enhancement: Added new diagnostic check "reportMatchNotExhaustive" which reports cases where a match
statement doesn't exhaustively cover all cases.
Enhancement: Added support for unpack operator for tuples used within type arguments. Support for this new syntax will appear in Python 3.11.
Bug Fix: Added code in parser to detect obscenely deep parse subtrees containing binary and unary operations. These were sometimes leading to crashes in the binder and type evaluator. The parser now replaces them with error parse nodes and reports an error to the user.
Bug Fix: Added recursion check in type guard logic to address stack overflow issue seen in telemetry.
Bug Fix: Fixed bug that produces a false positive when attempting to assign a value of type Type[NoneType]
to Type[None]
. These are equivalent, so the assignment should be allowed.
Enhancement: Enhanced parser to detect and report a runtime error that occurs when using a generator expression without surrounding parens as an argument within a call expression when more than one argument or a trailing comma is present.
Bug Fix: Fixed a bug that resulted in a false positive when a member access expression targeted an attribute that was returned by a __getattr__
method that returns a descriptor object. The old logic was binding the descriptor to the object, but that's inconsistent with the way things work at runtime.
Enhancement: Improved analysis of finally
block and the code that comes after the finally
block so type narrowing performed within the finally
block in the fall-through case is preserved.
Enhancement: Added support for Final
and ClassVar
annotations embedded within Annotated
. Runtime support has recently been added for this case.
Enhancement: Added support for InitVar
that is wrapped in Annotated
. Support is being added for this in the runtime.
Enhancement: Added special-case handling for methods declared as returning a Generator
, AsyncGenerator
or AwaitableGenerator
that do not contain a yield statement. This special case applies only to methods declared in stub files, an abstract method, or a protocol definition with no code.
Bug Fix: Improved support for custom subclasses of the builtin property
class. Previously, the special-case handling in place for property
were not handling these custom subclasses well, and this resulted in several false positive errors and incorrect type evaluations.