PylanceBot
e4a0f2088c
[PylanceBot] Pull Pylance with Pyright 1.1.265 ( #3783 )
...
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
2022-08-03 14:14:43 -07:00
Eric Traut
cdba65d4c8
Fixed a bug that caused incorrect type evaluation because of stale module paths that are cached for specific source files. Module paths are dependent on the list of configured import resolution paths, so when the import resolution paths change, we may need to recompute the module path for a source file.
2022-08-03 11:12:12 -07:00
Eric Traut
05c46fc09a
Fixed a bug that caused a false positive error when using a list comprehension within a method that is overloaded to accept either a LiteralString
or a str
. The incorrect overload was chosen in some cases, picking the LiteralString
variant rather than the str
variant even though LiteralString
variant generated type errors.
2022-08-03 06:57:24 -07:00
Eric Traut
21a6a1b2a9
Published 1.1.265.
2022-08-02 20:00:42 -07:00
Eric Traut
0f170d81c4
Switched from map to set for internal recursion map. No functional change, just a small improvement in memory consumption.
2022-08-01 15:22:41 -07:00
Eric Traut
cb5efdb405
Improved performance of code flow engine in cases where two variables have significant strong interdependencies and are modified within a loop.
2022-08-01 10:38:31 -07:00
Eric Traut
0971dc3f12
Fixed a bug that resulted in a false positive error when using an unpack operator (*
) in a quoted type annotation with versions of Python prior to 3.11.
2022-07-31 09:53:06 -07:00
Eric Traut
74d43236f6
Fixed a bug that resulted in incorrect bidirectional type inference for constructor calls for generic classes when the expected type was Self
.
2022-07-29 19:54:04 -07:00
Eric Traut
1e87ba5342
Fixed a bug that resulted in a false positive error when assigning a property created through the @property
decorator to a variable or parameter annotated with the type property
.
2022-07-29 19:24:44 -07:00
Eric Traut
771a5df597
Fixed a bug that led to sporadic false positive errors for expressions that involve a call to super()
.
2022-07-29 18:19:20 -07:00
Eric Traut
b05dfb2a00
Updated typeshed stubs to the latest version.
2022-07-27 22:55:04 -07:00
Eric Traut
05bce0e0ce
Fixed false positive errors that resulted from the previous change to format string type inference.
2022-07-27 22:54:45 -07:00
Eric Traut
bff68271c7
Fixed two type evaluation bugs that caused false positive errors when using join
method with LiteralString
and when a format string is interpreted as a LiteralString
.
2022-07-27 19:18:43 -07:00
PylanceBot
6fa755c025
pull-pylance-with-pyright-1.1.264 ( #3755 )
...
Co-authored-by:
Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
Co-authored-by: Erik De Bonte <erikd@microsoft.com>
2022-07-27 12:31:21 -07:00
Eric Traut
861dfbe06e
Published 1.1.264
2022-07-26 17:52:34 -07:00
Eric Traut
b32d3c1e2d
Fixed a bug that resulted in infinite recursion and a crash when inferring return types for functions that returned another function that also has an inferred return type, etc. in a cycle.
2022-07-26 07:37:08 -07:00
Eric Traut
4eb32ac8ff
Changed reportUninitializedInstanceVariable
check to exempt protocol classes.
2022-07-26 07:21:25 -07:00
Eric Traut
f2515eccbd
Fixed a bug in the type printer code that resulted in an infinite recursion and crash.
2022-07-25 23:46:50 -07:00
Eric Traut
f9c69d9c92
Added support for _generate_next_value_
override for Enum
class.
2022-07-25 21:47:36 -07:00
Eric Traut
ea380d8abf
Moved more enum-specific logic.
2022-07-25 20:43:09 -07:00
Eric Traut
d7440baa16
Moved logic related to Enum
to a new internal module for maintainability.
2022-07-25 20:34:37 -07:00
Eric Traut
9e7c3d16eb
Fixed a bug that resulted in incorrect type inference for unannotated parameters with a default argument value in an __init__
method.
2022-07-25 20:05:53 -07:00
Eric Traut
865b803b9e
Fixed bug that resulted in a false positive error when using a TypedDict that has been narrowed via an assignment to a not-required key.
2022-07-24 07:59:50 -07:00
Eric Traut
c6e504cd2a
Fixed bug in reportUnnecessaryComparison
check that results in a false positive error when comparison chaining is used.
2022-07-23 11:47:05 -07:00
Eric Traut
ed38e0363e
Fixed bug in reportUnnecessaryContains
check that resulted in a false positive when the container element type is a TypeVar. The same logic error was present (and fixed) in the type narrowing logic for in
expressions.
2022-07-23 11:00:35 -07:00
Eric Traut
4b24c9ea56
Published 1.1.263
2022-07-22 21:01:12 -07:00
Eric Traut
faf7adbc3e
Fixed a performance issue (combinatoric explosion) related to TypedDict classes that were narrowed based on a series of in
type guard tests.
2022-07-22 20:46:25 -07:00
Eric Traut
97a57170ef
Simplified some internal types, which results in less memory usage and better performance.
2022-07-21 20:58:00 -07:00
Eric Traut
092770e5e6
Fixed bug that resulted in sporadic errors when evaluating index expressions within a loop.
2022-07-21 20:09:04 -07:00
Eric Traut
183e051577
Fixed bug that resulted in incorrect type evaluation within case statement in some situations.
2022-07-21 17:39:29 -07:00
Eric Traut
85441372eb
Fixed recent regression that resulted in incorrect type evaluation when a forward-referenced recursive type alias was used as an iterable type.
2022-07-21 00:35:39 -07:00
Eric Traut
25f01e93c9
Fixed bug that resulted in inconsistent behavior for types inferred from tuple expressions containing literal entries.
2022-07-20 18:38:34 -07:00
PylanceBot
31ee14793b
pull-pylance-with-pyright-1.1.262 ( #3726 )
...
Co-authored-by:
Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
Co-authored-by: Erik De Bonte <erikd@microsoft.com>
2022-07-20 12:06:14 -07:00
Eric Traut
e82d5f353a
Published 1.1.262
2022-07-20 07:19:31 -07:00
dependabot[bot]
f4017da8c6
Bump terser from 5.10.0 to 5.14.2 in /packages/vscode-pyright ( #3724 )
...
Bumps [terser](https://github.com/terser/terser ) from 5.10.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases )
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md )
- [Commits](https://github.com/terser/terser/commits )
---
updated-dependencies:
- dependency-name: terser
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-19 20:05:27 -07:00
dependabot[bot]
ea2e39b84d
Bump terser from 5.10.0 to 5.14.2 in /packages/pyright ( #3723 )
...
Bumps [terser](https://github.com/terser/terser ) from 5.10.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases )
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md )
- [Commits](https://github.com/terser/terser/commits )
---
updated-dependencies:
- dependency-name: terser
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-19 19:15:39 -07:00
Eric Traut
bab8e4e012
Fixed a bug in the dataclass logic that resulted in incorrect handling of a dataclass field that is annotated both in the class body and (redundantly) in a method within the same class.
2022-07-19 13:40:39 -07:00
Eric Traut
4739c575da
Removed more debug code.
2022-07-19 00:52:34 -07:00
Eric Traut
06d6e97341
Removed some debugging code that was not meant to be checked in.
2022-07-18 23:50:56 -07:00
Eric Traut
4c55be22ca
Fixed a bug that caused defineConstants
configuration setting not to work with the pyright and pylance VS Code extensions.
2022-07-18 11:15:04 -07:00
Eric Traut
4ea169521e
Changed the validation logic for type argument lists when found outside of a type annotation. The normal type annotation restrictions (such as no dynamic variable usage) should not apply in this case.
2022-07-18 10:51:09 -07:00
Eric Traut
285550c5ce
Updated configuration documentation to include reportUnnecessaryContains in the table.
2022-07-17 23:42:44 -07:00
Eric Traut
7f3e7b0d2e
Added support for new reportUnnecessaryContains
diagnostic rule to catch potential bugs in in
and not in
containment checks.
2022-07-17 23:29:50 -07:00
Eric Traut
2dae8d9cb9
Fixed bug in type narrowing logic for "in" operator. It was not properly handling the case where the reference (LHS) type was a subtype of the container's element type.
2022-07-17 23:29:00 -07:00
Eric Traut
b02711fd94
Implemented tighter scoping for contextual evaluation. This improves performance of type evaluation in various use cases including semantic tokens.
2022-07-17 19:14:45 -07:00
Eric Traut
4499d4262f
Fixed minor typo in comment.
2022-07-17 19:14:44 -07:00
Eric Traut
ba4995e484
Updated typeshed stubs to latest version.
2022-07-17 08:22:55 -07:00
Eric Traut
ba90156fc9
Added optimization in overload path that eliminates one extra validation of arguments in the common case.
2022-07-16 18:17:17 -07:00
Eric Traut
222ea2534b
Added a faster code path for testing the type compatibility of a non-union type to a union type when the union type contains no unsolved TypeVars.
2022-07-16 16:41:47 -07:00
Eric Traut
8936b6b823
Fixed minor typo in comment.
2022-07-16 11:02:27 -07:00