Commit Graph

4484 Commits

Author SHA1 Message Date
dependabot[bot]
ad901a0d73
Bump node-fetch from 2.6.6 to 2.6.7 (#2918)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-22 19:11:10 -08:00
Eric Traut
d60eadaed3 Published 1.1.214 2022-01-22 19:02:37 -08:00
Eric Traut
494720e6b3 Fixed regression in lambda type inference that produced false positive errors in some cases. 2022-01-22 19:00:51 -08:00
Eric Traut
06d20c40c6 Revert "Fixed a bug in an optimization path for function type evaluation. It was using the more expensive bidirectional type inference code path unnecessarily."
This reverts commit 24b6cf0c85.
2022-01-22 18:45:30 -08:00
Eric Traut
11d0354967 Updated typeshed stubs to latest. 2022-01-22 18:32:36 -08:00
Eric Traut
0667f967cf Published 1.1.213 2022-01-22 17:53:57 -08:00
Eric Traut
b8de4ef8a0 Revert "Removed some special-case code for named tuples that's no longer needed."
This reverts commit b478593caa.
2022-01-22 17:53:57 -08:00
Eric Traut
9b00633e5c Added provisional support for the proposed "typing.reveal_type" call. 2022-01-22 16:40:38 -08:00
Eric Traut
d428782e3a Eliminated a few uses of "finally" in the type evaluator because they were getting in the way of debugging. 2022-01-22 16:39:25 -08:00
Eric Traut
24b6cf0c85 Fixed a bug in an optimization path for function type evaluation. It was using the more expensive bidirectional type inference code path unnecessarily. 2022-01-22 14:43:24 -08:00
Eric Traut
0d25b14476 Fixed a bug in the logic that handles classes that are constructed from custom metaclasses. 2022-01-22 14:42:23 -08:00
Eric Traut
3b962b2689 Added support for bidirectional type inference when an await operator is used in an expression. 2022-01-22 13:53:01 -08:00
Eric Traut
47d9df848f Fixed a bug in the parser that resulted in a false negative when using an assignment expression (walrus operator) in the if clause of a list comprehension with no surrounding parentheses. 2022-01-22 13:38:03 -08:00
Eric Traut
eb646f5e8e Improved the bidirectional type inference logic for lambdas to handle the case where one or more of the matching parameter types was a TypeVar. 2022-01-22 13:23:19 -08:00
Eric Traut
b0e238bdfb Improved the logic that handles instantiation of a custom metaclass when the name of the new class is passed as a string literal to the metaclass constructor. 2022-01-22 12:58:15 -08:00
Eric Traut
d7128e6a5f Simplified assumptions in populateTypeVarMapBasedOnExpectedType call. 2022-01-22 12:55:12 -08:00
Eric Traut
b478593caa Removed some special-case code for named tuples that's no longer needed. 2022-01-22 12:38:37 -08:00
Eric Traut
01a7cba878 Fixed bug that resulted in confusing error message when dataclass field was annotated with Self and then the class was subclassed. 2022-01-22 12:33:37 -08:00
Eric Traut
11c825a7ea Fixed bug in metaclass test so the test code runs. 2022-01-22 12:32:46 -08:00
Eric Traut
0c1012f9fa Attempt to fix build break. 2022-01-21 13:48:26 -08:00
Eric Traut
a67d306ea5 Updated some dependencies to more recent versions. For the Pyright VS Code extension, increased the required VS Code version from 1.57.0 to 1.63.1. 2022-01-21 13:23:44 -08:00
Eric Traut
9e60066203 Fixed a bug that resulted in a false positive type evaluation error when using bidirectional type analysis for a call expression and the return type of the call contained a union of a TypeVar and another type and the expected type contained a union with at least one literal type. 2022-01-20 21:59:39 -08:00
Eric Traut
44c98fe747 Added check for a class that derives from a protocol class where the protocol declares a method with an empty implementation, and the subclass doesn't provide a concrete implementation of the same-named method. 2022-01-20 20:25:12 -08:00
Eric Traut
a45b8dce08 Added special-case handling for instance variables in a dataclass that are marked Final. Previously, these were flagged as an error because there was no explicit value assigned to them, but the synthesized __init__ method implicitly initializes them. 2022-01-20 16:53:54 -08:00
Eric Traut
248b8d22d8 Fixed a bug in the logic that detects duplicate enum members that resulted in a false positive when an enum class has other instance variables that are not enum members. 2022-01-20 14:39:45 -08:00
Eric Traut
98868f268f Fixed bug that resulted in crash due to infinite recursion. 2022-01-19 22:13:29 -08:00
Eric Traut
c62bc7d637 Fixed bug that resulted in a false positive when accessing a field in a base class that provides a __getattr__ method and is use in conjunction with another base class. 2022-01-19 20:11:18 -08:00
Bill Schnurr
adaab317f5
pull pylance (#2899)
1. Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
    2. Co-authored-by: HeeJae Chang <hechang@microsoft.com>
    3. Co-authored-by: Erik De Bonte <Erik.DeBonte@microsoft.com>
2022-01-19 16:01:17 -08:00
Eric Traut
d51e773eba For not-required TypedDict fields, added a second synthesized overload for the two-parameter form of get that specifies the type of the second parameter is the same type as the field value. The other overload allows this second parameter to be of a different type. 2022-01-19 14:58:06 -08:00
Eric Traut
da81cdf22f Updated documentation to cover the new # pyright: basic comment. 2022-01-19 12:53:07 -08:00
Eric Traut
ad823f469f Published 1.1.212 2022-01-19 12:44:59 -08:00
Eric Traut
dbbf0d68c4 Removed some debugging code that I accidentally left in. 2022-01-19 11:18:29 -08:00
Eric Traut
25688ca5c0 Improved logic for type(x) is y type narrowing pattern so it handles the case where x is Any. 2022-01-19 11:05:11 -08:00
Eric Traut
7d64f7a7ff Improved error message when attempting to assign a callable type where a parameter in the destination is named but position-only in the source. 2022-01-18 21:35:12 -08:00
Eric Traut
511b4dc1e1 Fixed bug that resulted in a false positive when using bidirectional inference with a constructor with complex set of covariant, invariant, and contravariant type parameters. 2022-01-18 21:18:42 -08:00
Eric Traut
7c16d8ace5 Added support for typing.dataclass_transform or typing_extensions.dataclass_transform in anticipation of them being added to the typeshed stubs at some point. 2022-01-18 15:25:15 -08:00
Eric Traut
799079e9b5 Removed special-case code for no_type_check decorator because it's now included in typeshed's stubs. 2022-01-18 15:22:57 -08:00
Eric Traut
3a17ccaec8 Simplified some code in dataclass logic. No functional change. 2022-01-18 15:19:20 -08:00
Eric Traut
83bdbe7bfb Added optimization where object is implicitly added as a base class for a class only if there is not another base class specified. This eliminates the need for additional work in some type analysis code paths. 2022-01-18 14:41:46 -08:00
Eric Traut
38c29410de Fixed a bug that resulted in a false positive error when determining whether method overrides for a multi-inheritance chain are compatible. 2022-01-18 14:40:51 -08:00
Eric Traut
4a8b12db51 Added support for # pyright: basic comment to enable basic type checking in a file. 2022-01-18 13:57:09 -08:00
Eric Traut
9134e2a76c Fixed bug that resulted in a crash if a TypedDict class was derived from another TypedDict class and the base class had zero fields defined. 2022-01-18 13:35:14 -08:00
Eric Traut
94ea724331 Fixed bug that resulted in false positive when one or more sources of types in TypeVar solving was unknown. 2022-01-18 11:01:37 -08:00
Eric Traut
4274e94f95 Improved diagnostic string for expected_type mismatch in reveal_type function. 2022-01-18 00:22:58 -08:00
Eric Traut
30e0f0ba52 Published 1.1.211 2022-01-18 00:04:30 -08:00
Eric Traut
09622393a3 Fixed bug in type evaluation of index expressions that involve a recursive type alias in the subscript. Also improved text version of expanded types that include recursive type aliases. 2022-01-17 23:42:51 -08:00
Eric Traut
4884ec1e8b Improved a few assert messages to help track down a crash we're seeing in the telemetry. 2022-01-17 22:25:18 -08:00
Eric Traut
ebb0facbf0 Fixed bug that caused a crash in functools.partial special-case logic. 2022-01-17 22:05:23 -08:00
Eric Traut
854ed27cca Added some defensive checks in argument / parameter matching code to try to prevent crash seen in telemetry. 2022-01-17 21:56:52 -08:00
Eric Traut
182224b221 Added limit to prevent stack overflow when walking code flow graph to determine reachability. 2022-01-17 21:56:00 -08:00