Bug Fix: Fixed a bug that resulted in incorrect type evaluation for members of a StrEnum subclass under certain circumstances. This was caused by a circular dependency in ReprEnum caused by pyright's validation of __init_subclass__ as part of class type evaluation. This change moves this validation step from the type evaluator to the checker, eliminating the potential for circular dependencies and improving performance.
Bug Fix: Fixed a bug that resulted in a false positive error indicating that a type definition relies on itself in a circular manner.
Bug Fix: Fixed a bug that resulted in incorrect type evaluation for constructor calls using bidirectional type inference where the expected type includes TypeVars that are not in scope for the constructor call.
Bug Fix: Fixed a bug that resulted in incorrect type narrowing based on literal field discrimination (<a>.field == <literal>) where the expression <a> is a member access expression.
Bug Fix: Fixed a bug in the "--verifytypes" CLI option that resulted in incorrect calculation of the type completeness core in cases where a private symbol with an incomplete type was imported and re-exported from a public module.
Bug Fix: Fixed a bug that resulted in incorrect analysis when a ClassVar annotation was enclosed in quotes (i.e. a forward reference).
Bug Fix: Fixed a bug that resulted in a false positive error when a contravariant generic class was specialized with a union type argument used with bidirectional type inference.
Enhancement: Updated typeshed stubs to the latest.
Published 1.1.273
Bug Fix: Fixed recent regression that resulted in a false positive error related to argument-to-parameter matching.
Enhancement: Added a missing check for class-scoped covariant or contravariant TypeVars that are used in a base class where the base class defines the corresponding type parameter to be invariant. This leads to a typing hole, so it should be considered an error.
Bug Fix: Fixed a bug that led to the incorrect inferred type for a parameter in an unannotated __init__ method in the case where the method overrides a method in a base class.
Published 1.1.272
Enhancement: Added bidirectional type inference support for comprehension statements that create generators. This addresses microsoft/pyright#3948.
Bug Fix: Improved handling of circular dependencies in a generic class hierarchy — in particular, where a class is parameterized by a constrained TypeVar where one of the constraints includes the class or its ancestors. This addresses microsoft/pyright#3955.
Bug Fix: Fixed false positive reportInvalidTypeVarUse diagnostic in an overload implementation. This addresses microsoft/pyright#3958.
Bug Fix: Fixed confusing error message when a value is written to a class attribute that is not defined on the class but is defined on the metaclass but with an incompatible type. This addresses microsoft/pyright#3960.
Enhancement: Updated typeshed stubs to the latest version.
Enhancement: Improved error message readability for generic class type incompatibilities.
Bug Fix: Fixed a bug that resulted in incorrect type evaluation when calling a generic class constructor from within that class implementation. This addresses microsoft/pyright#3927.
Bug Fix: Fixed recent regression. Default includes/excludes should be used when pyproject.toml is present. This addresses #3965.
Enhancement: Extended support for method override completions that use member access expression forms in a parameter's default value expression. This addresses microsoft/pylance-release#3374.
Bug Fix: Fixed false positive error when a call expression provides zero arguments for an unpacked tuple of indeterminate length within a Callable. This addresses #3972.
Bug Fix: Improved error message for positional parameter count mismatch when the signature contains an unpacked tuple with either a definite or indefinite length.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps pyright from 1.1.271 to 1.1.274.
Release notes
Sourced from pyright's releases.
Commits
fdc9844
Published 1.1.274f04730c
Published 1.1.273a7f3fdd
Published 1.1.272df789b5
pull-pylance-with-pyright-1.1.271 (#3946)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)