Published 1.1.75
Bug Fix: Fixed bug that caused some source files that were part of a "py.typed" package to not be identified as such. This meant that the special rules for "py.typed" exports were not being applied in those cases.
Enhancement: Updated typeshed stubs to the latest.
Behavior Change: Added special-case handling of values within enum classes in a py.typed package. They should be treated as constants and not require type annotations.
Behavior Change: Improved detection of implicit type aliases.
Bug Fix: Fixed bug that caused incorrect error in case where bidirectional type inference was used with a list expression and the expected type was an empty protocol.
Bug Fix: Fixed a bug where spurious errors were generated when using an unannotated "self" as an argument to a constructor in a generic class.
Enhancement: Added type narrowing for expressions of the form " in X" and " not in X" where X is a union of TypedDict instances.
Bug Fix: Fixed several bugs related to recursive type aliases. The hover text was sometimes incorrect, type narrowing for "isinstance" was broken in some cases, and the reportUnnecessaryIsInstance rule was reporting incorrect errors.
Bug Fix: Fixed bug in code that prints function types that contain a "named-parameter separator" (""). It was emitting an extra slash ("/").
Enhancement: Added check for position-only argument separator ("/") appearing as the first parameter in a parameter list. This is a syntax error.
Bug Fix: Fixed incorrect handling of global name bindings when a same-named nonlocal name was present.
Enhancement: Expanded support for idioms used in libraries to define __all__
. Tuples are now supported, as are calls to expand
, append
and remove
.
Bug Fix: Fixed bug with synthesized __set__
and __del__
property methods. The wrong parameter types were being specified for the 'self' and 'obj' parameters.
Bug Fix: Fixed bug in diagnostics reporting logic that caused stack overflow in some rare cases.
Bug Fix: Fixed bug in callable
type narrowing logic where the union of the type includes None
.
Bug Fix: Improved handling of bidirectional type inference for constructor calls on generic types. In particular, the new logic better handles the case where the expected type is a union.
Bug Fix: Fixed bug in type inference for generator types. It was not properly adding the three type arguments for Generator in the inferred return type.
Behavior Change: Implemented new rules for reexports within a py.typed module. ".py" files now follow PEP 484 rules with an override based on __all__
.
New Feature: Implemented new "verifytypes" command-line option that analyzes a py.typed package and reports missing or partially-unknown types.
Enhancement: Added limiter for list type inference to clip the number of unique subtypes and avoid poor performance in some cases.