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
Eric Traut
8bf3f5ede1
Removed redundant use of TestWalker. It was being run twice for all tests.
2022-07-16 09:48:13 -07:00
Eric Traut
08431a3191
Published 1.1.261
2022-07-16 08:37:17 -07:00
Eric Traut
4dc92711cd
Enhanced reportUnnecessaryTypeIgnoreComment
to ignore lines that are unreachable.
2022-07-16 00:36:42 -07:00
Eric Traut
b783e6be6e
Improved handling of type consistency checks for unions so the results are less dependent on the order of subtypes within the union.
2022-07-15 23:33:00 -07:00
Eric Traut
81b286244a
Fixed a bug that resulted in an incorrect type evaluation when a generic callable class variable was specialized recursively with type variables for the same class.
2022-07-15 20:28:30 -07:00
Eric Traut
7defbb9535
Removed obsolete test.
2022-07-15 20:11:56 -07:00
Eric Traut
948c369a34
Fixed bug in constraint solver that led to a false positive error in some situations where the solution to a TypeVar involved the union of two other TypeVars.
2022-07-15 19:59:22 -07:00
Eric Traut
b9ac977211
Fixed bug that resulted in sporadic errors during type evaluation based on evaluation order.
2022-07-15 19:35:40 -07:00
Eric Traut
c37f09ba10
Removed no-longer-used internal field "isSuperCall". No functional change.
2022-07-15 19:20:28 -07:00
Eric Traut
3088949359
Enhanced the reportIncompatibleVariableOverride check to catch cases where a Final variable overrides a non-Final variable.
2022-07-14 18:54:26 -07:00
Eric Traut
3db7524def
Added support for overloaded __getitem__
in iterables for for
statements.
2022-07-14 16:47:23 -07:00
Eric Traut
757f25ab3a
Fixed regression that caused an internal assertion (and therefore a crash) when using an expression that includes two index expressions, one with a string literal and one without, like a[n].b.c['x']
.
2022-07-14 09:00:49 -07:00
Eric Traut
e8d2167dd7
Made another tweak to the max code complexity to try to strike the right balance. The previous value was too low and broke one of our tests.
2022-07-13 16:54:48 -07:00