github microsoft/pyright 1.1.368
Published 1.1.368

latest releases: 1.1.389, 1.1.388, 1.1.387...
5 months ago

Bug Fixes:

  • Fixed a bug that causes warnings.deprecated not to work if the python version is 3.13. This was caused by recent changes to typeshed stubs.
  • Fixed bug that results in inconsistent diagnostics when surrounding an argument expression with parentheses.
  • Fixed bug that causes a "bare" type (with no type argument) or type[Any] to be treated as a possible descriptor object.
  • Fixed regression that results in an internal assertion (and crash) related to TypeVar variance inference.
  • Fixed a bug in the "type printer" (the component responsible for translating a type into its textual form) for type aliases defined using PEP 695 syntax.
  • Fixed bug that resulted in the incorrect synthesis of __dataclass_fields__ for named tuples.
  • (Contributed by @insync) Fixed stubPath's default value in configuration schema.
  • Fixed bug in pattern matching for Callable() in the negative (fall-through) case.
  • Fixed bug that results in unions consisting of different specialized forms of a generic TypedDict to "lose" all but one of these subtypes.

Behavior Changes:

  • Changed inference behavior for generator functions with no reachable yield or yield from statements. The "yield type" (the first type argument to Generator) is now inferred as Never in this case rather than None.
  • Changed the behavior of double underscored symbols that are part of a module's namespace when that module is not a stub or in a "py.typed" package. Such symbols are no longer ignored, although they are considered private.
  • Changed the way that PEP 695 type aliases are displayed when hovering over a reference to the type alias. Previously, the symbol was displayed as TypeAliasType rather than the expanded type alias type.

Enhancements:

  • Added support for deprecated objects that are instantiated prior to being used as a decorator. This allows for a factory usage pattern.
  • Added check for illegal use of Protocol type argument that is not a type parameter. The runtime generates an exception for this condition.

Don't miss a new pyright release

NewReleases is sending notifications on new releases.