Bug Fix: Reverted new version of chalk library. The newer version is not compatible with node v12.
Bug Fix: Fixed a bug that resulted in a false positive error when attempting to assign a TypeVar T that has a bound of type to an expression type[S].
Enhancement: Added a new configuration options flag called enableExperimentalFeatures that controls whether certain experimental features are enabled. Currently there are three features under this flag: StrictTypeGuard, ReadOnly fields for typed dicts, and inlined TypedDict definitions.
Enhancement: Removed support for experimental StrictTypeGuard and replaced it with an experimental variant of TypeGuard that applies strict semantics if certain conditions are met.
Bug Fix: Fixed a bug that led to incorrect variance inference when a value annotated with a class-scoped TypeVar was assigned to an instance variable.
Behavior Change: Updated heuristics for how to handle custom metaclass __call__ methods based on feedback. Previously, if a metaclass __call__ method was present, pyright assumed that __new__ and __init__ may not be called, so it ignored them. The new heuristic assumes that if the metaclass __call__ returns a type that is consistent with the expected return type of type.__call__ that it is probably mirroring the behavior of type.__call__ and calling the class' __new__ and __init__ methods.
Behavior Change: Changed auto-variance algorithm to exempt class and instance variables that are named as protected or private.
Bug Fix: Fixed a regression that caused class decorators of generic classes to no longer be specializable.
Bug Fix: Fixed a bug that resulted in an apparent hang within the type printing logic. This was triggered by a pathological case involving a deeply recursive type.
Behavior Change: Modified type inference logic so methods that raise an exception whose type derives from NotImplementedError is not inferred to return NoReturn. Previously, only NotImplementedError was exempted, not subclasses.
Behavior Change: Removed old code that looks for a typeshed override in the standard python search paths. This works around an issue with the inject library, which installs a bogus typeshed directory into site-packages.
Bug Fix: Fixed a bug that results in unsolved type variables in a call return if the target function's return type is a callable that has type variables that are scoped to that callable.
Bug Fix: Fixed a bug that resulted in incorrect type evaluation when a generic function that returns a callable is passed itself as an argument and the resulting callable is then called and passed that same function as an argument.
Bug Fix: Fixed a bug in the command-line version of pyright where it did not enable "auto search paths", so it didn't automatically add "src" as an extra path.
Bug Fix: Fixed a bug that led to a false negative when determining whether two base classes that are combined using multiple inheritance implement the same method in an incompatible way. The bug caused the check to be skipped if the child class also implemented the same method as the two base classes.
Bug Fix: Fixed a bug that resulted in a false positive error when using an unpack operator within a call to an overloaded function.
Bug Fix: Fixed a bug that resulted in a false positive error when a captured variable within an inner scope (function or lambda) is imported from another module using an import statement that comes after the function or lambda.
Bug Fix: Fixed bug that led to incorrect type evaluation when accessing the name attribute on an enum.
Published 1.1.319
Bug Fix: Fixed a bug that results in a crash when attempting to use a member access expression where the LHS is a TypeVarTuple.
Bug Fix: Fixed a bug that led to a false negative when analyzing code with an async context manager that swallows exceptions.
Enhancement: Improved error messages for situations where a call expression targets an overloaded function or method and there are no matches. Added some heuristics to pick the "best" overload function for the error message. Previously, pyright used the last overload, but this sometimes led to confusing errors.
Enhancement: Added support for the X is C and X is not C type guard pattern (where C is a class).
Bug Fix: Fixed an issue in type evaluation of call expressions where the callable subexpression evaluates to a union, and the callable subtypes have different signatures. Pyright was previously caching the types from the first subtype, so it didn't re-evaluate using the second subtype (which may require bidirectional type inference).
Bug Fix: Fixed bug in hover text where it was not producing the correct text output for an instantiable callable.
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.293 to 1.1.320.
Release notes
Sourced from pyright's releases.
... (truncated)
Commits
e0c05cf
Published 1.1.320932e542
pull-pylance-with-pyright-1.1.319 (#5584)98a6792
Published 1.1.3191d558e0
Published 1.1.31888bff7e
Added fsevents to lock file.cc92429
Add fsevents as optional dependency to public package (#5503)8e021d2
[PylanceBot] Pull Pylance with Pyright 1.1.317 (#5505)2eee955
Published 1.1.31774d8f3c
pull-pylance-with-pyright-1.1.316 (#5401)67fe932
Published 1.1.316Dependabot 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)