Commit Graph

7555 Commits

Author SHA1 Message Date
PylanceBot
16f398976a
pull-pylance-with-pyright-1.1.369-9716881771 (#8261)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com>
2024-06-28 17:41:06 -07:00
Eric Traut
bee1d912fd Fixed bug that results in a spurious error when evaluating a quoted (forward reference) type expression that includes an index expression within a TypeAlias definition. This addresses https://github.com/microsoft/pylance-release/issues/6072. 2024-06-28 15:15:20 -07:00
Eric Traut
3c70b4e0d1
Fixed bug that results in incorrect type evaluation of a function that accepts a Callable[P, T] and is passed a class object whose constructor needs to be converted to a callable. This addresses #8170. (#8258) 2024-06-28 10:19:57 -07:00
Kacie Kang
5d5fe5d15c
fix pylance issue 6052 (#8253) 2024-06-27 16:22:49 -07:00
Eric Traut
8f8f5b163d
Fixed recent regression that results in false positive when a inner function with an inferred return type is a coroutine (async) and is referenced within the function body in which it's declared. This addresses #8232 and #8229. (#8251) 2024-06-27 13:16:23 -07:00
Eric Traut
f104e7bb30
Fixed bug that results in false positive reportInconsistentOverload and reportNoOverloadImplementation errors when an overloaded decorator is applied to a non-overloaded function or method. This addresses #8246. (#8249) 2024-06-27 05:35:50 -07:00
Eric Traut
1e1e912380 Fixed bug that results in a false positive when a protocol includes a method implementation that conditionally raises NotImplementedError. This addresses #8245. 2024-06-27 04:30:13 -07:00
Eric Traut
337ef2fa00 Fixed recent regression that results in an assertion failure (and therefore a crash) when type() is called with dynamic base classes. This addresses #8228. 2024-06-26 16:51:15 -07:00
Eric Traut
bdb8eba712 Updated typeshed stubs to the latest version. 2024-06-26 16:30:53 -07:00
Eric Traut
05726120ad
Fixed bug that results in incorrect type isinstance or issubclass type narrowing when using a type variable with an upper bound that includes a promotion type. This addresses #8238. (#8243) 2024-06-26 16:30:26 -07:00
Eric Traut
427ca1143e Fixed bug that resulted in a false negative when assigning to type tuple[Never]. This addresses #8237. 2024-06-26 15:01:45 -07:00
Bill Schnurr
b5d4d92f0a
add an azure devops build (#8200)
* add an azure devops build

* fix prettier

* moving azure build under azuredevops folder
2024-06-25 11:39:05 -07:00
PylanceBot
1168be715e
pull-pylance-with-pyright-1.1.369-9665934702 (#8225)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-25 10:09:34 -07:00
Eric Traut
a5cbd4725a Published 1.1.369 2024-06-25 18:02:18 +02:00
Eric Traut
24f64f7d26 Fixed bug that results in incorrect type narrowing in the negative (fall-through) case of a match expression when the subject expression is an unbounded tuple. This addresses #8219. 2024-06-25 13:56:02 +02:00
Eric Traut
2672441c22 Fixed bug that leads to a spurious "unbound variable" diagnostic when a variable is assigned a value using a walrus operator and is later used in a ** call argument. This addresses #8218. 2024-06-25 13:28:04 +02:00
Eric Traut
bc1fc9f22b Added support for walrus (assignment) operator within set literal expressions if the python version is >= 3.10. The grammar was changed in 3.10 to support this. This addresses #8216. 2024-06-24 23:56:08 +02:00
Eric Traut
3a263135ab
Fixed bug that incorrectly evaluates a constructor call to a constructor that infers a class-scoped ParamSpec when the passed function is generic. This addresses #8170. (#8215) 2024-06-24 22:04:09 +02:00
Eric Traut
6ffb60bd53
Fixed bug that results in a false positive error when using a callback protocol with a function-scoped type variable. This addresses #8177. (#8207) 2024-06-23 14:57:32 +02:00
Eric Traut
ee12ebcccf Improved reportUninitializedInstanceVariable check to handle dataclass variables that are initialized implicitly by the synthesized __init__ method. 2024-06-22 21:44:36 +02:00
Erik De Bonte
3e6661a315
Fix binary search in findNodeByOffset to match linear search result (#8143) 2024-06-22 09:10:06 -07:00
dependabot[bot]
cfeed20baf
Bump braces from 3.0.2 to 3.0.3 (#8204)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-22 15:24:27 +02:00
Hamir Mahal
0c4c9ab592
fix: usage of deprecated version of Node.js (#8201) 2024-06-22 15:05:06 +02:00
Eric Traut
2efc12f999
Improved diagnostic messages for type errors detected during __set__ and __delete__ calls to a descriptor object. This addresses #8181. (#8198) 2024-06-21 23:13:01 +02:00
Eric Traut
d2ff2a4517
Fixed bug that results in an incorrect overload implementation diagnostic when using tuple[()] in overloads. This addresses #8194. (#8195) 2024-06-21 13:25:01 +02:00
Eric Traut
221a977705 Changed hover provider output for type aliases to conform more closely with the new Python 3.12 type syntax. This partially addresses #8185. 2024-06-21 12:41:22 +02:00
Eric Traut
1bbb5d90a1 Fixed recent regression that results in a runtime assert (and therefore a crash) in certain circumstances when computing the MRO for a class. This addresses #8191. 2024-06-20 21:33:48 +02:00
Eric Traut
b841e110f3
Improved consistency of unreachable code. Previously, unreachable code was not supported for if or else suites when the condition type was narrowed to Never. This addresses https://github.com/microsoft/pylance-release/issues/6028. (#8190) 2024-06-20 17:00:26 +02:00
Eric Traut
81ff21e21a
Fixed bug that leads to a false negative when a subscript object used in an index expression supports __index__ but the indexed object specifies that it requires int. This addresses #8183. (#8188) 2024-06-20 16:14:49 +02:00
Jonas Vacek
4a9b9a547c
fix broken markdown link (#8186) 2024-06-20 15:55:37 +02:00
Eric Traut
98d68d5d3a Fixed recent regression in reportUninitializedInstanceVariable check relating to NamedTuple instance variables. This addresses #8184. 2024-06-20 14:44:57 +02:00
PylanceBot
b7be7b9a10
pull-pylance-with-pyright-1.1.368-9572872079 (#8173)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com>
2024-06-19 11:00:21 -07:00
Eric Traut
20942b3389
Added support for detecting mismatched property types in base classes used for multiple inheritance. This addresses #8167. (#8175) 2024-06-19 08:52:40 +02:00
Eric Traut
1bf99d3212 Published 1.1.368 2024-06-19 00:01:32 +02:00
Eric Traut
86715ec758 Fixed bug that results in unions consisting of different specialized forms of a generic TypedDict to "lose" all but one of these subtypes. This addresses #8169. 2024-06-18 23:31:13 +02:00
Eric Traut
918bc4c745 Removed some vestigial code related to inlined TypedDicts. 2024-06-18 23:17:37 +02:00
dependabot[bot]
e54e2f4399
Bump braces from 3.0.2 to 3.0.3 in /packages/pyright-internal (#8172)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 22:51:29 +02:00
dependabot[bot]
beb1f15f4b
Bump braces from 3.0.2 to 3.0.3 in /packages/pyright (#8122)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eric Traut <eric@traut.com>
2024-06-18 22:48:31 +02:00
Eric Traut
18511f1441 Added check for illegal use of Protocol type argument that is not a type parameter. The runtime generates an exception for this condition. This addresses #8158. 2024-06-17 23:05:57 +02:00
Eric Traut
ef025a1ac2
Fixed bug in pattern matching for Callable() in the negative (fall-through) case. This addresses #8160. (#8163) 2024-06-17 23:04:30 +02:00
InSync
0f654e077b
Fix stubPath's default value in schema (#8156) 2024-06-17 14:25:17 +02:00
Eric Traut
48a03076a3 Fixed bug that resulted in the incorrect synthesis of __dataclass_fields__ for named tuples. This addresses #8152. 2024-06-16 22:41:09 +02:00
InSync
5f47007df3
Clarify description for exclude (#8148) 2024-06-16 05:59:09 +02:00
Eric Traut
7ca7631808 Changed the way that PEP 695 type aliases are displayed when hovering over a reference to the type alias. Previously, the symbol was displayed as TypeAliasType rather than the expanded type alias type. This addresses #8147. 2024-06-15 19:03:12 +02:00
Eric Traut
6dc3b39902 Fixed a bug in the "type printer" (the component responsible for translating a type into its textual form) for type aliases defined using PEP 695 syntax. 2024-06-15 18:28:09 +02:00
Eric Traut
a03eb8492e Removed recent change in dataclass_transform handling. Dataclass properties should not be inherited from base classes after all. See https://discuss.python.org/t/dataclass-transform-inheriting-class-doesnt-recognize-kw-only-true-from-parent-class/55734/2. 2024-06-14 09:15:34 -07:00
Eric Traut
cbd189a29f
Changed dataclass_transform behavior to allow dataclass behaviors (like kw_only) to be overridden by intermediate base classes. This addresses #8140. (#8141) 2024-06-13 15:29:01 -07:00
Eric Traut
75d0f2b5a1 Fixed regression that results in an internal assertion (and crash) related to TypeVar variance inference. This addresses #8137. 2024-06-13 09:42:37 -07:00
Eric Traut
093e74aa6e
Fixed bug that causes a "bare" type (with no type argument) or type[Any] to be treated as a possible descriptor object. This addresses #8136. (#8138) 2024-06-13 08:56:09 -07:00
Eric Traut
5cb16fe7e4 Fixed bug that results in inconsistent diagnostics when surrounding an argument expression with parentheses. This addresses part of #8133. 2024-06-12 22:02:52 -07:00