Skip to content

Published 1.1.402

Compare
Choose a tag to compare
@bschnurr bschnurr released this 11 Jun 23:26

Changes:

  • f584f78 Published 1.1.402
  • 0246b06 Fixed bug that results in a false positive "fully overlapping overload" error when a second overload uses a Callable with a ParamSpec but the first does not. This addresses #10587. (#10588)
  • ce1c735 Improved modeling of bound and unbound methods so they properly use types.MethodType or types.FunctionType. This addresses #10514. (#10586)
  • 859cc50 Added support for bidirectional type inference when assigning an expression to an unpacked tuple literal and all of the items in the tuple have a declared type. This addresses #10481. (#10585)
  • 4887eb7 Fixed bug that results in confusion between two classes defined in the same file with the same name but in different functions when they are used in protocol matching. This addresses #10418. (#10584)
  • 4cd01c6 Revert "Added check for mutable values of type list, dict, or set when used as default values for a dataclass field. These result in TypeErrors at runtime. This addresses #10553. (#10557)"
  • f326cc6 Added reportUnreachable diagnostic check. If enabled, it emits a diagnostic for code that is determined to be structurally unreachable or unreachable via type analysis. It does not report code that is within a code block that is gated by a conditional that is statically determined to be false, such as TYPE_CHECKING and version checks. This diagnostic check is off by default even in strict mode because there are legitimate reasons for unreachable code to exist in Python code. (#10581) [ #10284 ]
  • c165c3f Reverted narrowing behavior for discriminating between TypedDicts. This narrowing behavior isn't technically correct from a type safety standpoint, but until PEP 728 is accepted, it's the only practical way to do this form of discrimination. This addresses #10517. (#10579)
  • 8610325 Changed behavior when @final is applied to a method but subsequent decorators (like @functools.cache or @property) subsequently transform the method into a different type. The typing spec is not clear how this should work. Pyright now honors the @final in these cases, which is consistent with mypy. This addresses #10543. (#10578)
  • a52db80 Fixed bug that causes bidirectional type inference to be skipped when the target of an assignment is a member access expression (base.member) and the base expression is a module. This addresses #10539. (#10577)
See More
  • b23d4a2 Fixed bug that results in a false positive reportUnusedVariable error under specific conditions when an expression's local type has a circular dependency. This addresses #10512. (#10575)
  • 6ecb8f2 Added support for Sentinel type introduced in draft PEP 661. The enableExperimentalFeatures setting must be set to true to enable this feature. This addresses #10565. (#10574)
  • db0da4b Added support for Python 3.14 "template string" feature (PEP 750). This addresses #10320. (#10572)
  • 6adcbc8 Fixed a bug that results in some additional (unnecessary) memory consumption under certain circumstances involving reachability analysis. This change shouldn't result in any observable behavioral changes other than (theoretically) slightly less memory pressure. (#10569)
  • 7137377 Updated typeshed stubs to the latest version.
  • 64b389c Fixed bug that results in crash when a class is parameterized by a TypeVarTuple that has a non-TypeVarTuple after it in the type parameter list. This addresses #10563. (#10564)
  • 29ce473 Fixed bug that results in incorrect behavior when a type variable is used to define the extra_items type for a generic TypedDict. This addresses #10545. (#10563)
  • 332c215 Added special-case logic to detect when a class-like symbol created by calling NewType is used as an actual class for assignability or member accesses. This addresses #10550. (#10562)
  • 0f8ded0 Added support for PEP 758, which allows Python 3.14 and newer to support multiple exceptions in an except clause without surrounding parentheses. This addresses #10546. (#10561)
  • 960fb52 Fixed bug that results in a false negative when attempting to assign an IntEnum or StrEnum literal to the Literal type corresponding to its value type. This addresses #10552. (#10558)
  • 9148e3d Added check for mutable values of type list, dict, or set when used as default values for a dataclass field. These result in TypeErrors at runtime. This addresses #10553. (#10557)
  • bd84a04 Revert "Fixed bug that results in a false positive when accessing a generic attribute from an object whose type is type[X]. This addresses #10304. (#10305)"
  • 3f17258 Fixed bug in language service code that was mutating the contents of a parse node.
  • 743b482 Bump tar-fs from 2.1.2 to 2.1.3 in /packages/vscode-pyright (#10533)
  • ced3289 Removed dependency on unused package "leven". No functional change.
  • d340ecc Minor code cleanup for consistency and maintainability.
  • 9cccf0e Moved regular expressions used in hot paths to global constants so they don't need to be reconstructed each time. (#10506)
  • cc812ef Fixed longstanding bug in tokenizer that can result in incorrect behavior under certain circumstances involving characters that require two uint16 unicode character codes (a surrogate followed by a second word). (#10504)
  • d296a1a Updated typeshed stubs to the latest version.
  • 50dda51 Alternative fix for recent regression related to _type_checker_internals.pyi (#10496)
  • 321b6bf Removed some circular module dependencies. (#10485)
  • b249d11 pull-pylance-with-pyright-1.1.401-20250521-185403 (#10486)

This list of changes was auto generated.