Commit Graph

247 Commits

Author SHA1 Message Date
Erik De Bonte
fc1b547130
Push pylance changes to pyright (#7719)
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>
Co-authored-by: Rich Chiodo <rchiodo@microsoft.com>
Co-authored-by: Stella Huang <stellahuang@microsoft.com>
Co-authored-by: Kacie Kang <jikang@microsoft.com>
2024-04-17 11:46:31 -07:00
PylanceBot
b1bb82d8f1
[PylanceBot] Pull Pylance with Pyright 1.1.350 (#7240)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-09 13:35:42 -08:00
Rich Chiodo
e01b0fe205
Add test(s) that validate Pyright can talk over LSP (#7172)
* Everything building, but not running

* More tests passing

* Fix test to open a file

* Remove unused functions and consolidate others

* Remove unused custom lsp messages

* Add comments
2024-01-31 16:38:37 -08:00
PylanceBot
1ed4cc325b
pull-pylance-with-pyright- (#6967)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com>
2024-01-12 11:35:42 -08:00
Rich Chiodo
a5b352d929
Change all file paths to use a new URI class. (#6519)
* Preliminary idea

* First commit

* Refactor all uri based path functions to uriUtils

* Most of real code building

* More tests working

* More progress on the tests

* Rest of typecheck errors

* Move URIs even further to prevent accidental issues

* More tests

* Relative path fixes

* More test fixes and changes to 'startsWith'

* Uri tests all passing

* remove uri tests from path utils tests

* Fix relative paths for partial stub remapping

* Make isEmpty look empty and fix empty check for resolved paths

* Fix module name retrieval issue

* Use map instead of set for URI list

* Another path is empty fix.

* Fix importresolver finding source files for stubs

* Fixup actual defs to match expected format

* Relative path differences again

* Fix some comparisons

* More comparison fixes

* Config of ('.') was using current directory to find module names

* Shortcut empty URI for existence

* Add back ignoring case

* Fix regex matching

* All tests passing

* Fix build after merge

* Fix failing tests

* Fix rootDirectory and python path from interpreter

* Some perf improvements

* Don't bother reparsing in file system

* More tests and some logging output

* Extra data for analyzing slowness

* Fix build problems

* Refactor to not use vscode.URI except for initial parse

* Try without vscode uri validation

* Rework to new perf idea

* Split out class and interface

* All uri tests passing

* Fix other tests

* Cache results for faster perf

* Add memoization decorator

* combinePath remove one layer and make key gen faster

* Move caches local

* Generalize the memoization and optimize zero arg funcs

* Cache more stuff

* slight speedup for cache saving

* slight improvement by just returning the cached item

* Small optimization to skip loop if possible

* Further speedup for similar calls of combinePath

* Make it possible to switch between profiled and not

* Another small optimization

* Cache files in directory

* Small opt for isNativeModuleFileName

* Speed up getting pytyped info

* Fix command line parsing to expand ~
Slight perf improvement for exists cached by not splitting

* Split out instrumenting memoization

* Remove instrumented memoizationin

* Fix comment

* Fix build on ubuntu/mac

* Fix windows specific problems with tests
Fix auto import to work with windows file paths

* Fix command line output

* Try fixing CI path for failing test

* fix output paths in other spots

* More file output locations

* Output more data for failing test

* Put validation back and fix test

* Fix import cycles message to not show URI path

* Remove printing of config options

* More review feedback

* Missed a spot in the review feedback

* Fix build error

* Update packages/pyright-internal/src/analyzer/importResolver.ts

Co-authored-by: Erik De Bonte <erikd@microsoft.com>

* Update packages/pyright-internal/src/analyzer/analyzerFileInfo.ts

Co-authored-by: Erik De Bonte <erikd@microsoft.com>

* Update packages/pyright-internal/src/analyzer/backgroundAnalysisProgram.ts

Co-authored-by: Erik De Bonte <erikd@microsoft.com>

* Review feedback from Erik

* Revert changes to launch.json

* Fixup config options to use same roots as before

* Fix casing for cwd test on windows

* Fix spack differences

* Add back in the instrumentation until figure import resolve cache

* Fixup after merge

* Fix another equals comparison

* Merge error

* Fix after merge

* Fixup after merge

* Keep track of case sensitivity in the URIs

* Fix test failures on windows/mac

* Switch to the faster version

* Remove memoization

* Review feedback for some renames

* Review feedback

* Feedback from Erik, put back memoization for simple stuff

* fix prettier

* Fix typo and cache URI creations

* Add a comment

* Review feedback from Eric

* Fix crash in config options

* Missed a piece of feedback

---------

Co-authored-by: Erik De Bonte <erikd@microsoft.com>
2023-12-07 09:15:39 -08:00
Eric Traut
76a183a446 Upgraded to typescript 5.2. 2023-11-21 13:12:48 -08:00
PylanceBot
932e542d9f
pull-pylance-with-pyright-1.1.319 (#5584) 2023-07-26 09:30:40 -07:00
Erik De Bonte
b917b7a5e0
Push pylance changes to pyright (#5542) 2023-07-19 12:46:11 -07:00
PylanceBot
8e021d2ae8
[PylanceBot] Pull Pylance with Pyright 1.1.317 (#5505)
* pull-pylance-with-pyright-1.1.317

* Add missing types

---------

Co-authored-by: rchiodo <rchiodo@microsoft.com>
2023-07-14 14:26:45 -07:00
PylanceBot
74d8f3c4d2
pull-pylance-with-pyright-1.1.316 (#5401) 2023-06-28 10:35:29 -07:00
Heejae Chang
73165c50c2
Push pylance changes to pyright (#5248)
* Push pylance changes to pyright

* Update packages/pyright-internal/src/backgroundThreadBase.ts

Co-authored-by: Erik De Bonte <erikd@microsoft.com>

---------

Co-authored-by: Erik De Bonte <erikd@microsoft.com>
2023-06-07 15:03:40 -07:00
PylanceBot
e1b6074b4d
pull-pylance-with-pyright-1.1.307 (#5093) 2023-05-10 10:56:49 -07:00
Rich Chiodo
009aef317b
Push pylance changes to pyright (#5066) 2023-05-03 10:54:00 -07:00
Erik De Bonte
6de737544c
Push pylance changes to pyright (#4783)
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>
Co-authored-by: Rich Chiodo <rchiodo@microsoft.com>
2023-03-15 17:27:27 -07:00
PylanceBot
e411e53e85
[PylanceBot] Pull Pylance with Pyright 1.1.295 (#4675)
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>
Co-authored-by: Rich Chiodo <rchiodo@microsoft.com>
2023-02-22 10:01:56 -08:00
Heejae Chang
b78a9e4bd3
Push pylance changes to pyright (#4404)
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>
Co-authored-by: Rich Chiodo <rchiodo@microsoft.com>
2023-01-04 14:07:31 -08:00
Erik De Bonte
4bc49e5ef1
Push pylance changes to pyright (#4209)
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>
Co-authored-by: Rich Chiodo <rchiodo@microsoft.com>
2022-11-18 17:20:20 -08:00
PylanceBot
59bdc42ed8
Update lerna (#3992) 2022-09-28 14:34:34 -07:00
PylanceBot
df789b5ea0
pull-pylance-with-pyright-1.1.271 (#3946)
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-09-14 11:42:18 -07:00
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
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
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
Heejae Chang
f3e85ee29d
fixed nested call signature help bug (#3667) 2022-07-06 12:50:54 -07:00
Bill Schnurr
7cadfb7412
update dependencies (#3638) 2022-06-29 15:56:46 -07:00
Erik De Bonte
826859e145
Pull from pylance (#3015)
Don't raise await error on top level statement in ipython mode, update dependencies

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-02-09 10:58:28 -08:00
Erik De Bonte
65946fc786
Update types to 17.0.8, fix logging typo, don't clear user file indic… (#2976)
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-02-02 16:25:51 -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
Heejae Chang
446a9bdb63
dependency updates, bug fix on file open/close, update on getPythonVersion (#2556)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> 
Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com>
2021-11-10 12:41:56 -08:00
Heejae Chang
fb86eac606
dependency updates and helper methods for future refactoring features (#2530) 2021-11-03 14:57:46 -07:00
Jake Bailey
d2771b18a8
Sync from Pylance (#2329)
Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
2021-09-22 14:26:36 -07:00
Jake Bailey
eca6f1a5c9
Sync from Pylance (#2309)
Rollup of:

- Update dependencies; TS 4.4, Prettier 2.4
- Explicitly handle unrooted execution environments (e.g., open file mode), preventing various crashes and oddities.
- Generate default values in method overload signatures. Previously, we didn't include them, which generated the wrong signature.
- Disable webpack caching (which recently broke upstream).
- Use attribute docstrings for type aliases in completion and hover.
- Clean up import resolver search path cache, which was leftover from the per-execution environment python interpreter removal.
- Modify parser to change the range of parenthesized expressions to their contents. This improves the ranges returned in hovers, document highlight, etc.
- Add boolean to ConfigOptions to check if the config was loaded from a config object (i.e., was produced in part by a `pyrightconfig.json` or `pyproject.toml` with a pyright section).

Co-authored-by: Bill Schnurr <bschnurr@microsoft.com>
2021-09-16 13:25:38 -07:00
Jake Bailey
4a89d1aea8
Update dependencies, plumb diagnostic versions, contextualize keyword completion on python version (#2247) 2021-08-31 16:56:33 -07:00
Heejae Chang
abd41b7273
Added literal type support in more places, fixed using wrong console bug and some refactoring around Host environment (#2176) 2021-08-11 13:11:54 -07:00
Jake Bailey
9ba8d6bdba
Update dependencies (#2156) 2021-08-05 16:03:07 -07:00
Jake Bailey
5718a7139a
Update dependencies, eliminate broken webpack plugin, begin browser refactorings (#2095) 2021-07-16 10:02:11 -07:00
Jake Bailey
23f9f75b2d
Update dependencies, restore sys.path check for directories (#1977) 2021-06-11 13:03:39 -07:00
Jake Bailey
e52d1e96e5
Typecheck JS, webpack caching, zip/egg support (#1937) 2021-06-02 12:18:10 -07:00
Jake Bailey
48a5f12840
Update deps, better ignore .git, bump to ES2019, fix case problem (#1860)
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
2021-05-14 12:02:43 -07:00
Eric Traut
b1036990ca Fixed a few inconsistent dependencies. 2021-05-13 17:22:30 -07:00
Jake Bailey
a9cf4129d2
Update dependencies (#1789) 2021-04-22 17:03:14 -07:00
Jake Bailey
df24cf916a
Update dependencies (#1655) 2021-03-18 16:39:24 -07:00
Jake Bailey
177714b1a6
Bump deps, handle py.typed in indexer, duplicate auto-import fix (#1548)
Co-authored-by: HeeJae Chang <hechang@microsoft.com>
2021-02-26 11:04:03 -08:00
Jake Bailey
298371fcea
Update deps (#1375) 2021-01-15 12:54:47 -08:00
Jake Bailey
91a5f8d515
Update deps (TS 4.1, others), switch to LSP-native progress reporting (#1277) 2020-12-14 15:13:10 -08:00
Jake Bailey
750a296b9f
Update deps, changes for native module replacements in import resolver (#1185) 2020-11-18 14:09:35 -08:00
Jake Bailey
f071b877b5
Module abbreviation infrastructure, remove unused mappings on completion resolve, other (#1135)
Rollup of:

- Verify `package-lock.json` state in checks to avoid lerna modifying things.
- Add infrastructure for module abbreviations in completions.
- Removed unused auto-import mapping from `completion/resolve` handler.
- Add `isInImport` to completion data for checking the completion context.
- Allow completion verification in fourslash tests to be overridden.
2020-11-03 16:44:28 -08:00
Jake Bailey
4ee0210ace
Update deps, add/rename completion member metadata, count calls in timer (#1126) 2020-10-27 15:09:38 -07:00
Jake Bailey
2d90df325f
Incremental document sync support, improved completion logging (#1109) 2020-10-19 15:04:48 -07:00
Jake Bailey
b45ce5b492
Check completion item kind, non-property completion fast path (#1099) 2020-10-14 15:32:07 -07:00
Jake Bailey
0fc1b5cf50
Update deps, fix call sig args, add plaintext doc support (#1096) 2020-10-12 16:10:25 -07:00