Published 1.1.119
Bug Fix: Fixed bug in type evaluator that caused some diagnostics to be suppressed unintentionally and in a non-deterministic manner (based on the order in which types were evaluated).
Enhancement: Added a heuristic to disable the "implied else" analysis if the code is within a function that has no input parameter annotations. This mitigates the performance overhead of "implied else narrowing".
Enhancement: When a function decorator is applied and the decorator returns a function that has no docstring, copy the docstring from the decorated function.
Enhancement: Changed inference logic for constructors to allow synthesized type for cls
to retain its generic form when instantiated, so the expression cls()
will remain generic.
Bug Fix: Fixed false positive "metaclass conflict" error that occurs when the metaclass has an unknown class type in its class hierarchy.
Bug Fix: Fixed bug in type evaluator when dealing with a bound TypeVar. The constraint solver wasn't properly handling the Type[T] statement in all cases.
Bug Fix: Fixed recent regression in CLI where partial stub packages were not applied correctly.
Enhancement: Eliminate duplicate python search paths, eliminating the need to search the same path more than once on every import resolution.
Bug Fix: Fixed crash in logic that handles partial type stub merging. The crash occurs when a search path points to a file (e.g. a zip file) rather than a directory.
Enhancement: Added support in PEP 646 when the unpacked TypeVarTuple is not at the end of the type parameter list. This allows for suffixing when matching type arguments against type parameters and when matching TypeVarTuple parameters in a Callable.
Enhancement: Added better error reporting for reveal_type and reveal_locals calls.
Enhancement: Added file system caching to import resolver for performance reasons.
Bug Fix: Fixed bug in type-printing logic for tuples. When typeCheckingMode is "off", type arguments are supposed to be displayed if they are not all "Any" or "Unknown", but they were omitted always.
Bug Fix: Fixed bug that caused type evaluation behavior that depends on (including, possibly, false positive errors) when evaluating subexpressions within a case statement.
Enhancement (from Pylance): Fix HTML escaping in code blocks.
Behavior Change: Exempt ParamSpec from "single use of TypeVar within function signature" check.
Enhancement: Improved error reporting for ParamSpec misuse.