Skip to content

Published 1.1.340

Compare
Choose a tag to compare
@github-actions github-actions released this 13 Dec 01:20
· 1122 commits to main since this release

Bug Fixes:

  • Fixed English text for position-only error. It contained an extraneous \" at the end.
  • Fixed a bug that resulted in a crash under certain circumstances when defining a type alias using a type statement when no type parameters are defined.
  • Fixed bug in narrowing logic for sequence pattern magic where special cases of str, bytes, and bytearray were not handled correctly.
  • Fixed bug that led to a false positive when a zero-argument form of super is called within an inner function or lambda.
  • Fixed a bug that led to a false positive error in certain cases involving a union of two callables.
  • Removed implicit __qualname__ attribute from the module namespace. It doesn't exist at runtime, so this was leading to a false negative.
  • Fixed bug that led to a false positive when a tuple of indeterminate length was used in a callback function.
  • Fixed a bug that led to an improper "unbound" type evaluation under certain circumstances in a finally clause.
  • Fixed bug that results in an extraneous } character in stub output.
  • Fixed bug that led to incorrect return type inference for a generator that always raises an exception rather than returning.
  • Fixed package manifest so default values of configurations are properly reflected.

Behavior Changes:

  • (From pylance) All paths are now internally tracked as URIs. This provides better support for files that are not stored within a file system. This should be transparent to most pyright users.
  • Previously, return type inference was disabled for all functions when analyzeUnannotatedFunctions was set to false regardless of whether the function had input type annotations. Return type inference is now enabled if the function is partially annotated.

Enhancements:

  • Improved error message for set invariance type violations.
  • Added support for the @warning.deprecated (PEP 702) functionality when an overloaded function implementation is marked deprecated and then used outside of a call expression.
  • Enhanced type narrowing logic for sequence pattern matching to support narrowing of tuple subject types based on sequence subpatterns.
  • Extended support for "partially unbound" variable detection to cases that involve comprehension and class scopes.
  • Eliminated the limitation that unpack operators, await operators, assignment expressions (walrus operators), f-strings, chained strings, and strings with escape characters cannot be used within Annotated expressions when using an alias of Annotated.