Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: microsoft/pyright

Published 1.1.407

24 Oct 22:36

Choose a tag to compare

Changes:

  • 276448f Fixed package-lock files
  • 783ee67 Published 1.1.407
  • f9fc2aa Updated typeshed stubs to the latest version (#11051)
  • 5f599f9 Added error reporting for unknown or unsupported config settings. This addresses #11040. (#11045)
  • cadded6 Fixed regression that results in --createstub doing nothing. This addresses #11043. (#11044)
  • 538053d Fixed bug that causes a false negative when a TypedDict overrides a parent with extra_items that are not ReadOnly with a ReadOnly field. This addresses #11037. (#11038)
  • ba3f0d4 Fixed bug that results in a false positive when a namedtuple functional form is used with a field starting with an underscore and rename=True. This addresses #11033. (#11034)
  • 80eb0dc Fixed bug in type narrowing for literal patterns. The runtime uses equality checks, so matching against the pattern 3 cannot necessarily narrow the type to Literal[3]. This addresses #11026. (#11028)
  • b1c9ae2 Fixed bug that results in a false positive error when a with statement has a single parenthesized context manager. This addresses #11020. (#11024)
  • 346f74c Fixed a bug that causes a @dataclass_transform to fail if the decorator returns a callback protocol rather than a Callable. This addresses #11015. (#11018)
See More
  • 20aa20a Pull Pylance with Pyright 1.1.406 (#11010)
  • 9ed33cf Fixed bug that results in a spurious error when running pyright on Python 3.14 but configured for Python 3.13 or earlier. This addresses #11003. (#11006)
  • 6e877dd Changed default Python version from 3.13 to 3.14 to reflect new stable version (#11004)
  • 69a5d84 Fixed bug that omit **kwargs parameter with an unpacked TypedDict with extra items. (#10997) [ #10996 ]
  • ed83d58 Eagerly exit isEnumClassWithMembers (#10990)
  • 17f24b3 Updated diagnostic message to include "standard" mode. This addresses #10988. (#10989)
  • 30db40b Add users to notification list for manual validation (#10984)

This list of changes was auto generated.

Published 1.1.406

01 Oct 00:00

Choose a tag to compare

Changes:

  • 308f5c0 Published 1.1.406
  • 38317d6 Fixed bug that results in false positive for module attributes that are synthesized for namespace modules. This addresses #10692. (#10972)
  • 676cd11 Fixed several bugs related to subscripts with unpack operators, notably when the unpack targets a tuple with a known length. This addresses #10723. (#10971)
  • 8996f91 Removed remaining code that was left over from PEP 637, which was rejected.
  • f7285d9 Added special casing in reportUnnecessaryComparison check for modules. This addresses #10706. (#10970)
  • 907028c Added check for the use of a NewType in a class pattern. This addresses #10784. (#10969)
  • 7b28a61 Updated typeshed stubs to the latest version (#10968)
  • ad557b5 Fixed bug that results in incorrect behavior when partial is applied to a function with a positional-only parameter separator. This addresses #10954. (#10967)
  • 6a92d60 Bump tar-fs from 2.1.3 to 2.1.4 in /packages/vscode-pyright (#10965)
  • b0fb77d Fixed bug that causes workspace edits to include annotation IDs without changeAnnotations field. (#10902) [ #10671 ]
See More
  • 79ff3e3 Fix literal overload completions in call arguments (#10762)
  • 1a46b0f Clarified implicit import rules in docs.
  • 97ae524 Fix regression in symlinked files (#10944)
  • b122ef9 Fix mypy_primer to run again (#10945)
  • 135fa85 Subtle issue with change tracking when not doing analysis (#10918)
  • 7905b19 Removed "reportShadowedImports" check and associated "renameShadowedFile" action. This feature is off by default in pyright although enabled by default in pylance. (#10891)
  • b182c80 Fixed bug that results in spurious errors when a wildcard import targets a traditional TypeVar with the same name as a PEP 695 TypeVar. This addresses #10900. (#10903)
  • eaa43e4 Reduced log level for "Skipping recursive symlink" when enumerating project files.
  • b4a158f Clarify editable install behavior with setuptools and uv (#10888)
  • d64f3fa pull-pylance-with-pyright-1.1.404-20250902-204731 (#10885)
  • b7c1e79 pull-pylance-with-pyright-1.1.404-20250902-173744 (#10882)

This list of changes was auto generated.

Published 1.1.405

10 Sep 19:00

Choose a tag to compare

Changes:

  • 7ee3058 Published 1.1.405.
  • bb13689 Fixed bug that results in false positive "reportPossiblyUnboundVariable" error on keyword argument names. This addresses #10811. (#10876)
  • 539aabd Updated error message for NewType used in isinstance check. I don't think this makes things clearer, but it is technically more correct. Addresses #10601.
  • ce16aa1 Changed the evaluated type of __class__ from type[Self] to type[<Enclosing class]. This addresses #10685. (#10874)
  • 099954d Added optimization that reduces the number of Uri objects that need to be created during type evaluation. This is an attempt to address #10832. (#10872)
  • 93c98d7 Fixed bug that causes a false negative when using unquoted types in a TypedDict functional class definition if the types are forward declared. This addresses #10612. (#10869)
  • 29bb1b0 Fixed bug that resulted in false negative when backslash followed by line feed occurs at end of file. This addresses #10814. (#10867)
  • f3ab90b Fixed false negative when a keyword parameter in a child class method overrides a method with a **kwargs in the parent and the type is incompatible. This addresses #10815. (#10866)
  • c407ded Fixed regression introduced in 1.1.343 that results in nondeterministic (order-dependent) type evaluation under certain circumstances involving recursive type aliases. This addresses #10850. (#10865)
  • d97565a Revert "Added support for tracking multiple constraint sets when performing protocol matching. This allows protocols with overloaded methods to contribute independent constraint sets. This addresses #9835. (#9864)" (#10863) [ #10849 ]
See More
  • aff9b4f Fixed bug that contributes to out-of-memory crashes under certain circumstances where a module's transitive import graph is very large and may not fit within the available heap space. (#10862)
  • 7395f59 Bump tmp from 0.2.3 to 0.2.5 in /packages/vscode-pyright (#10824)
  • 769a124 Added support for match_args dataclass parameter. This addresses #10858. (#10861)
  • 464bc01 Fixed bug that results in false negative when a closed=False is used in TypedDict that subclasses from a non-open TypedDict base class. This addresses #10859. (#10860)
  • eccd633 Revert "Reverted a recent change that appears to have affected performance on some projects. This attempts to address #10832. (#10841)"
  • b85f7ff Improved performance of import resolution when there are large number… (#10855)
  • b45deb0 Document editable installs with uv (#10854)
  • cd980e2 Fixed a bug that results in spurious errors if a class decorator is a… (#10846) [ #10836 ]
  • 30068aa Fixed a bug that results in false positive errors when using object methods (like __eq__) on a Sentinel instance. This addresses #10773. (#10844)
  • 1ce3e78 Fixed bug that results in incorrect literal math results for bitwise negation. This addresses #10834. (#10842)
  • fe7aaf2 Reverted a recent change that appears to have affected performance on some projects. This attempts to address #10832. (#10841)
  • d639324 pull-pylance-with-pyright-1.1.403-20250820-201137 (#10831)

This list of changes was auto generated.

Published 1.1.404

21 Aug 17:18
f11dd22

Choose a tag to compare

Changes:

  • f11dd22 Switch to Node 22 and make publish to npm wait (#10830)
  • ba6a729 Update azure-pipelines-release.yml for Azure Pipelines
  • 33f41a8 Published 1.1.404
  • e32022c Improved performance and memory usage of import resolver by not recording import failure information unless caller asks for it. This is normally needed only when verboseOutput is enabled. (#10819)
  • 572bc31 Implemented a number of performance and memory optimizations (#10816)
  • 2d1aaf0 Fixed a recent regression that broke the "--threads" option in the CLI. (#10812)
  • 7b90e9e Made PEP 728 (TypedDict with extra items) no longer experimental since it has been accepted by the SC. (#10804)
  • de2d23d Improved startup performance for large projects by lazily computing the module name of each source file. (#10798)
  • 78088b4 Bump tmp from 0.2.3 to 0.2.4 (#10771)
  • f1c19c6 Bump axios from 1.10.0 to 1.11.0 (#10742)
See More
  • c125807 Bump form-data from 4.0.3 to 4.0.4 in /packages/vscode-pyright (#10732)
  • 42c478f Tweaked the new source enumerator implementation so it enumerates files in the same order as the old implementation. The order that files are type checked shouldn't theoretically matter, but in practice there can be minor differences (e.g. union order in error messages).
  • b8688e7 Fixed regression that resulted in a false positive error when using reportUninitializedInstanceVariable with a NamedTuple class. This addresses #10490. (#10791)
  • facb494 Fixed a bug that results in a false positive error when a break or continue statement is used within a while or for loop within an exception group block. This addresses #10766. (#10790)
  • 6dc4f77 Updated typeshed to the latest version.
  • 390f1da Removed trailing whitespace in diagnostic line output. This addresses #10726.
  • fd0a5e8 Improved startup responsiveness on large monorepos (#10786) [ #3075 ]
  • 8b02aa8 Pull Pylance with Pyright 1.1.403 (#10687)

This list of changes was auto generated.

Published 1.1.403

08 Jul 20:53

Choose a tag to compare

Enhancements:

  • Updated typeshed stubs to the latest version

Behavior Changes:

  • Removed experimental support for PEP 736, which was rejected. (#10616)

Published 1.1.402

11 Jun 23:26

Choose a tag to compare

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.

Published 1.1.401

21 May 00:08

Choose a tag to compare

Bug Fixes:

  • Fixed a bug in the type narrowing logic for the S in D type guard pattern (where S is a string literal and D is a TypedDict). If the TypedDict is not closed, the absence of the key within the TypedDict definition cannot eliminate the type during narrowing.
  • Fixed a bug that leads to a false negative when accessing a key on a TypedDict that is defined with extra_items=Never.
  • Fixed bug that results in incorrect variance inference when a property access method uses a method-local type variable to annotate the self parameter.
  • Fixed bug that results in a false positive error under certain circumstances where the second argument for a super call is a union.
  • Fixed bug that results in a false negative when deriving from a stdlib protocol class and not implementing one or more abstract methods.
  • Fixed bug that results in incorrect type narrowing behavior when the second argument to an isinstance call includes a union (specifically with the | operator) within a tuple expression.
  • Fixed a bug that results in a spurious error when __class__() is assigned to Self.
  • Added missing check for unquoted self references when calling TypeAliasType constructor manually (as opposed to using the PEP 695 type syntax).
  • Fixed a bug that results in incorrect expansion of the bytes promotion type if the value is a bytes literal.
  • Fixed bug in type narrowing logic for class patterns in a match statement. Negative type narrowing was incorrect when the subject is a literal type and the class is the corresponding non-literal class.

Enhancements:

  • Improved handling of __slots__ members to correctly model the case where a descriptor object is stored in a __slots__ variable.
  • Modified --verifytypes output to expand type aliases in its error messages to help diagnose "partially unknown" conditions.
  • Enhanced x is ... type narrowing logic to narrow Any | EllipsisType to EllipsisType to match x is None narrowing logic.
  • Updated typeshed stubs to the latest version.

Behavior Changes:

  • Switched internal usage of builtins.function, typing.AwaitableGenerator, and typing._TypedDict to types.FunctionType, _typeshed._type_checker_internals.AwaitableGenerator, and _typeshed._type_checker_internals.TypedDictFallback, respectively.

Published 1.1.400

23 Apr 04:29

Choose a tag to compare

Bug Fixes:

  • Fixed bug that results in a false positive when accessing a generic attribute from an object whose type is type[X].
  • Fixed bug that results in incorrect type narrowing of a variable that is shadowed in an inner-scoped comprehension.
  • Fixed bug that results in a false positive error when referencing a class-scoped type alias defined as a callable.
  • Fixed bug that causes bidirectional type inference not to be used in cases where a ternary expression is assigned to an annotated instance or class variable and the ternary condition narrows the type of self or cls.
  • Fixed bug that results in a spurious "type already specialized" error when using a class-scoped type alias defined using a type statement or TypeAliasType constructor.
  • Fixed a bug that leads to a hang when a generic type alias definition refers to itself.
  • Fixed a bug that results in missing diagnostic details under certain circumstances where bidirectional type inference is attempted in the assignment of an attribute.
  • Fixed a bug that results in a false positive error when calling a function with an unpacked TypedDict with extra_items when additional keyword args are passed.
  • [From pylance] Fixed regression introduced in 1.1.399 that caused pyright CLI to fail to run on Linux systems.

Enhancements:

  • Extended "type(x) is C" type narrowing logic to support cases where C is a union of types or a type variable with a union upper bound.
  • Added support for PEP 765, which makes it a syntax error (or warning) in Python 3.14 if a return, break or continue is used to exit a finally clause.
  • Added check for named tuple field names that begin with an underscore. These result in a runtime exception.

Behavior Change:

  • Reverted a recent change that extended the reportPrivateImportUsage check to enforce imports from submodules whose names begin with an underscore. This change was disruptive to users of the popular pandas library because it exports a submodule named _typing. This was originally intended to be experimental or private, but it was never fully addressed. The pandas maintainers will work to fix this issue (pandas-dev/pandas#55231) over the next year. I'm going to back out this change to pyright in the meantime.

Published 1.1.399

08 Apr 19:11

Choose a tag to compare

Bug Fixes:

  • Fixed bug that results in incorrect type narrowing when a value whose type is a non-callable (and non-final) class is passed as the second argument to an isinstance call and the first argument is a callable type. In this case, a subclass could provide a compatible __call__ method, so the type shouldn't be narrowed to Never.
  • Fixed bug that results in a false positive "missing stub file" diagnostic when importing a "py.typed" submodule from a namespace package.
  • Fixed bug that results in a false negative when a type variable with an upper bound is used to annotate a parameter in a method override.
  • Fixed a bug that results in a false negative for a method override that uses Self in a contravariant position.
  • Fixed bug that results in a false positive error under certain circumstances involving a type variable with an upper bound of type[T] that is assigned to another type variable.
  • Fixed a bug that results in a false negative when the specialization of a TypeVarTuple includes multiple unpacked tuples of unknown length.
  • Fixed a bug that results in a false negative when a class that derives from type[Any] is assigned to any other type.
  • Fixed bug that results in an incorrect error under certain circumstances when inferring the return type of a recursive function that has a decorator or is async.
  • Fixed bug that results in a false negative when a return statement contains a call expression that invokes a NoReturn call and the argument list contains errors.
  • Fixed bug that leads to a false positive in the reportUnnecessaryComparison check when one operand's type is a callable and the other is not.
  • [From pylance] Fixed a bug that results in an internal assertion (and therefore a crash) when __builtins__.pyi imports from a project file.

Enhancements:

  • Extended deprecateTypingAliases feature to support symbols imported from typing_extensions.
  • Extended reportUnknownVariableType check to include cases where a value whose type is a generic class parameterized by Unknown is assigned to a variable with a declared type.
  • Extended the check for isinstance and issubclass argument validation to flag the Literal special form, which leads to a runtime error when used in the second argument.
  • Updated typeshed stubs to the latest version. This version removes support for Python 3.8, which is now out of service.

Behavior Changes:

  • Removed support for ru and ur string prefixes. These were supported in Python 2.7 but are syntax errors in Python 3.x.

Published 1.1.398

26 Mar 03:43

Choose a tag to compare

Bug Fixes:

  • Fixed bug that results in a spurious type error when a ParamSpec is used in conjunction with a dataclass and a contextmanager.
  • Fixed recent regression that results in a false negative when calling a function with a positional-only parameter whose type is generic and has a concrete default argument value.
  • Fixed regression that results in an Unknown type evaluation where previously Any was generated during bidirectional type inference.
  • Fixed bug that results in incorrect overload resolution when an unpacked argument is of unknown length and potentially matches multiple overloads.
  • Fixed bug that results in a variable being displayed as "not accessed" if it's used in an argument expression for a call expression whose base type is a module or None.
  • Fixed bug that results in a hang under certain very specific circumstances involving a protocol method that has been decorated in such a way that it can no longer be bound to the owning protocol class.
  • Fixed a bug that contributes to inconsistent type evaluation results when using the "--threads" feature.
  • Fixed bug that results in incorrect "literal math" result when dividing Literal[0] by a negative literal int value.
  • Fixed a bug in "literal math" for shift operators. If the RHS value is negative, the operation is invalid, so literal math shouldn't be applied.
  • Fixed bug in "literal math" logic for modulo and floor divide operators that affect cases where operands have different signs.

Behavior Changes:

  • Changed algorithm for applying type narrowing upon assignment when one or both of the declared type or assigned type contain "Any".
  • Removed special-casing for async functions that skips check for implicit return when the return type is NoReturn.

Enhancements:

  • Updated typeshed stubs to the latest version.
  • Extended reportPrivateImportUsage to report the use of symbols imported from private submodules in a "py.typed" or stub library.
  • Extended the reportUnnecessaryComparision check to support the patterns x is None and x is not None in cases where x is provably disjoint in type.
  • Added generalized support for assignment expressions (walrus operators) for type guards.
  • Extended the type narrowing logic for the x == L type guard pattern so it supports the case where x is LiteralString and L is a string literal.