Skip to content

Published 1.1.350

Compare
Choose a tag to compare
@github-actions github-actions released this 05 Feb 16:49
· 264 commits to main since this release

Bug Fixes:

  • Fixed a bug that resulted in an incorrect type evaluation when a TypeVar with a default (PEP 696) was used in an overload but was not solved.
  • Fixed a bug that results in a false negative when a None type is included in an unpacked argument within a function call.
  • Fixed a bug that results in a false positive error when a TypeVar bound to a union of literals is used in the specialization of a TypeAlias whose TypeVar is bound to a wider union of literals.
  • Fixed bug in isinstance type narrowing logic that leads to incorrect narrowed type when the filter type (the second argument) and the test type (the first argument) are both type variables.

Behavior Changes:

  • Changed behavior of super() method call when self is annotated as a protocol class. This pattern is used for annotating mix-ins. In this case, pyright should not generate an error if the protocol's method isn't implemented.
  • Added code to deduplicate references returned by the textDocument/references LSP call.

Enhancements:

  • [contributed by @Seairth] Added multi-root workspaceFolder support in path variable expansion.
  • Improved logic for unpacked arguments that contain an "Unbound" type.
  • Improved handling of unreachability analysis for an "implied else" (an if/elif chain that is missing a final "else" clause).
  • Added check for an attempt to override a field in a named tuple within a subclass.
  • Added check for an attempt to delete a named tuple entry.
  • Added check for use of TypedDict or NamedTuple as second argument to isinstance call, which isn't allowed.
  • Added check for out-of-bound index accesses for named tuple instances.
  • Improved misleading diagnostic message when attempting to call a special type form.
  • Updated typeshed stubs to the latest version.