Граф коммитов

8055 Коммитов

Автор SHA1 Сообщение Дата
Bill Schnurr 243983220e
pull-pylance-with-pyright-1.1.383 (#9133) 2024-10-02 06:53:06 -07:00
Eric Traut 5e57e0a3a5 Published 1.1.383 2024-10-01 15:39:50 -07:00
Eric Traut 606e12e815
Fixed bug that caused type alias to `Never` or `NoReturn` to lose its type alias association in some circumstances. (#9127) 2024-10-01 13:55:47 -07:00
Eric Traut c2364e4281
Fixed bug that results in a false negative when a type variable is defined with the expression `...`. This should be flagged as an illegal type expression. This addresses #9120. (#9123) 2024-10-01 09:09:16 -07:00
Eric Traut 67a3d24e51
Fixed a performance regression caused by a recent bug fix that affects variance inference for recursive type aliases. This addresses #9118. (#9119) 2024-09-30 22:01:34 -07:00
Eric Traut 93260969ff
Fixed several bugs related to the explicit specialization of a generic type alias parameterized by a single ParamSpec. `Concatenate` was being handled incorrectly. This addresses #9088. (#9117) 2024-09-30 21:20:19 -07:00
Eric Traut 0b02230dde
Improved type evaluation performance in certain cases involving protocol matching for complex, nested protocols. This addresses #9109. (#9115) 2024-09-30 14:30:09 -07:00
Eric Traut 6b19e98d26 Renamed internal symbol for readability and improved some comments. No functional change. 2024-09-30 13:10:26 -07:00
Eric Traut 3fcce1b8bb Refactored code to eliminate some circular dependencies that have crept into some of the type evaluator modules. No functional change. 2024-09-29 17:32:33 -07:00
Eric Traut 7309394e6e
Fixed bug that resulted in a false negative when assigning a specialized recursive generic type alias to itself when variance of its type parameters are not covariant. This addresses #9081. (#9103) 2024-09-27 21:36:55 -07:00
Eric Traut 61767ff247
Fixed bug that results in incorrect variance inference for some generic type aliases that use auto variance and nested callable types. (#9102)
Added the ability to view inferred variance for type aliases created with a `type` statement by hovering over the type parameter declaration.

This partly addresses #9081.
2024-09-27 19:56:28 -07:00
Eric Traut 37363e1c97 Reduced the minimum time between analysis passes from 20ms to 5ms to improve startup performance. 2024-09-27 17:20:00 -07:00
Eric Traut 4074d881a9 Added "skipNativeLibraries" config option for environments that are guaranteed not to have native libraries (e.g. web-based environments or playgrounds). 2024-09-27 17:19:25 -07:00
Eric Traut aee8a18744 Fixed incorrect logging message for execution environment "name" field. 2024-09-27 17:18:18 -07:00
Eric Traut 6c5787c899 More tweaks to logging for execution environments. 2024-09-27 16:42:49 -07:00
Eric Traut a485ccc833 Added check for use of a TypedDict class within a `case` statement class pattern. This condition generates a runtime error. This addresses #9078. 2024-09-27 11:47:03 -07:00
Eric Traut bdbb396355 Added code to propagate information about certain typing module imports from an implicitly-imported module (e.g. `builtins` or `__builtins__.pyi`) so `Final` and `ClassVar` can be treated as special forms by the binder. This fixes the use of these typing symbols in notebooks within pylance, which leverages implicitly-imported modules to "chain together" notebook cells. This addresses #6455. 2024-09-27 10:35:28 -07:00
Bill Schnurr 9a9d8877e6
Update release pipeline to fix code sign violations (#9097)
* Fix release pipeline warnings. Specify exact targetPath of the files … (#9096)

* realized the copy step was copying additional vsix files to build_output folder. Then the code signing check was complaining "build_output/gdn-vscode-pyright.vsix/..."
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=10276239&view=logs&j=2ea9903d-3972-52f8-7165-c7c73cff8483&t=7f83e459-ec8e-538a-5522-23f9d923a95c&l=14

* try additional targets

https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/43722/MicroBuild-Signing-and-1ES-PT-Code-Sign-Validation
2024-09-27 10:07:52 -07:00
Eric Traut 3e339eb4ba
Fixed bug with the provisional `TypeForm` support that breaks aliases of `Annotated`. This addresses #9092. (#9095) 2024-09-26 12:38:51 -07:00
Eric Traut cdcf40d506
Fixed a bug that leads to incorrect type evaluation when "literal math" for unary operators are applied to a TypeVar value that has a literal value upper bound. This addresses #9090. (#9094) 2024-09-26 11:36:15 -07:00
Stella e46efc6b58
Pull Pylance with Pyright 1.1.382 (#9077)
* Push pylance changes to pyright

* Update jest.config.js
2024-09-26 11:07:19 -07:00
Eric Traut da667e68d4 Improved verbose logging of execution environment information. 2024-09-26 10:09:57 -07:00
Eric Traut 6605ffca61 Fixed style issue. 2024-09-26 08:22:45 -07:00
Juan Torrente d0cabb74da
Counting files seen (#9087)
Adds a counter for number of files seen. Only shows "too many files" error message if bigger than a given number (hardcoded to 50 same as number of seconds is hardcoded to 10).

This avoids throwing the error suggesting opening a subfolder when the long operation time for directory reading is actually due to the number of files being read (as opposed to very large, very few files).
2024-09-26 08:08:41 -07:00
Eric Traut d2bd07bf6e Fixed a bug that resulted in an incorrect error when using a `# pyright: standard` directive. This addresses #9085. 2024-09-25 22:56:28 -07:00
Eric Traut 553222b529 Improved logging for execution environment settings. Previously, only the import search paths were logged. Now the python version and python platform are also logged. 2024-09-25 16:37:36 -07:00
Eric Traut b14a0db666 Made a change to speed up initial analysis when language server is first launched. Previously, a backoff timer of 250ms (which is intended only for user interactions) applied to startup. 2024-09-25 16:16:27 -07:00
Eric Traut a209885f0d Published 1.1.382 2024-09-24 17:40:55 -07:00
Eric Traut 399d57d395
Fixed a bug that results in incorrect type evaluation behaviors when a class has a custom metaclass with a `__call__` method and a `__new__` or `__init__` method that provides a different bidirectional type inference context for parameters. This addresses #9067. (#9071) 2024-09-24 15:16:56 -07:00
Eric Traut ef263af523
Extended `reportUnnecessaryComparison` to cover more cases involving `is` and `is not` operators. This addresses #9068. (#9070) 2024-09-24 12:27:08 -07:00
Eric Traut 6d66b90553
Fixed a bug that can result in a false positive error when a function signature contains a positional-only parameter and a keyword parameter with the same name. This can result from the application of a ParamSpec or through the use of an unpacked TypedDict. This addresses #9043 and #8964. (#9064) 2024-09-23 12:54:00 -07:00
Eric Traut 3a854fd445 Fixed bug that results in incorrect type narrowing when a value typed as `TypeForm` is used as the first argument to `isinstance`. This addresses #9053. 2024-09-23 10:22:02 -07:00
Eric Traut fb8cf71da5 Added check for the illegal use of `TypeForm` as the second argument to an `isinstance` or `issubclass` call. 2024-09-23 10:21:12 -07:00
Eric Traut 88bba999a9 Updated typeshed stubs to the latest version. 2024-09-23 08:32:54 -07:00
Eric Traut 06878da845
Fixed a bug that results in a false positive when assigning `Never` to a type variable in a contravariant context. This addresses #9056. (#9061) 2024-09-23 08:27:16 -07:00
Eric Traut 136bf0ef6b
Fixed bug that resulted in a "reportIncompatibleMethodOverride" error being reported in the wrong location when a property method has a decorator applied to it. This addresses #9059. (#9060) 2024-09-22 23:07:18 -07:00
Eric Traut e61f078b1a Clarified documentation for `reportAssertAlwaysTrue`. This addresses #9050. 2024-09-22 09:07:53 -07:00
Eric Traut ed4d23e784
Fixed bug that results in a false negative when assigning a value to a union type that includes the same type variable multiple times in at least one invariant context. This change eliminates the concept of a "locked" constraint tracker, which is no longer needed and was the underlying cause of the bug. This addresses #9047. (#9048) 2024-09-21 13:50:06 -07:00
Eric Traut 32a5ac5d2a Small code cleanup: use ParseTreeUtils.isWithinAssertExpression for isinstance check rather than inlining the logic to detect an assert expression. No functional change. 2024-09-21 11:55:22 -07:00
Eric Traut e0d33e4808 Fixed bug that results in false positive error when using a `Final` variable in a protocol and a NamedTuple or frozen dataclass as a concrete class. This addresses #9040. 2024-09-20 09:59:17 -07:00
Eric Traut 1a174766db Improved hover text for converters in dataclass-like classes. This addresses #9041. 2024-09-20 09:10:28 -07:00
Eric Traut 239749351d
Fixed bug that results in incorrect type inference for list, set, dict, and tuple expressions that include modules in them. This addresses #9036. (#9038) 2024-09-19 09:38:08 -07:00
Eric Traut 2b4563f535
Added special-case handling for the `len(t) == L` type guard pattern to handle the negative narrowing case where tuple `t` has a minimum length of `L`. In this case, the narrowed type can be computed whereas previously it was left unnarrowed. This addresses #9031. (#9034) 2024-09-18 12:30:06 -07:00
Stella d0411a0abc
Push pylance changes to pyright (#9033) 2024-09-18 10:23:51 -07:00
Eric Traut c58d75c021
Fixed bug that can result in incorrect type evaluation behaviors if a call to `type` is used within a loop. This addresses #9023. (#9024) 2024-09-17 19:05:20 -07:00
Eric Traut a56a4ecfcd Published 1.1.381 2024-09-17 15:52:44 -07:00
Erik De Bonte 06ab7a8899
Update Unicode range tables to match Unicode 16.0 (#9020) 2024-09-17 12:13:14 -07:00
Bill Schnurr ea18695c34
Add new vscode signing (#8977) (#9019)
Add new vscode signing, make sure signature file is different from the source manifest file.
When publishing to marketplace reuse artifacts for VSIX, instead of downloading from github
Include new manifest and signature files when publishing to marketplace
2024-09-17 10:43:59 -07:00
Eric Traut c20e613319
Fixed a bug that results in spurious "variable not allowed in type expression" errors when a type alias is used in a loop in both a type expression and a value expression. This addresses #9017. (#9018) 2024-09-17 10:01:45 -07:00
Rich Chiodo e353c9dec5
Put back logic of recreating the background analysis token on every schedule analysis (#9016)
* Recreate the cancellation token every time we start analysis like we used to before

* Refactor how token is generated to match old way of doing things
2024-09-16 17:33:02 -07:00