-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make possible to use pylance with a local fork of pyright #33
Comments
@r3m0t, can you provide more details about why you want to use pylance with a local fork of pyright? What is the use case you have in mind? This can help us explore potential solutions that meet your needs. |
Hi @erictraut, my work uses a monorepo including Python and TypeScript. As our Windows was too old for VFSForGit, a Visual Studio extension handles the files rather than checking them all out to disk. Our tsserver is also customised to read this monorepo, with some js code. As pyright is implemented in js, this could be used with pyright as well. Another use case is teaching it about some objects in ways that .pyi doesn't support but I haven't looked into this yet. |
You're certain welcome to clone the Pyright sources, modify them, and build a private version of the Pyright VS Code Extension or CLI for your own purposes. You won't be able to make use of the additional features provided by Pylance though. |
On a related note, are there plans for Pylance to use a released version of Pyright rather than a custom fork? We use Pyright on our CI server and it's import that type checking in VS Code and on the CI server behave identically. |
Pylance doesn't use a custom fork of Pyright. The release cadence of Pyright and Pylance are not always 100% sync'ed, so if you see any minor differences between the two, that's probably the explanation. There are also a few small differences in the default configuration settings for the two. Most importantly, "typeCheckingMode" defaults to "basic" in Pyright and "off" in Pylance. |
@erictraut Thanks for the explanation. Are the defaults for |
Yes, that's the other default that differs between the two. I think those are the only two. |
Yes, that's should be all of them. The only other may have been workspace vs open file only mode, but IIRC pyright switched to open file mode a while ago, and none of that matters for the CLI. |
I'm going to close this one for now; Pylance and pyright are very tightly integrated and evolve together as we implement things and fix issues, and something as big as allowing pyright to be swapped out will have to wait for a day when we introduce some stable API (which isn't something we've planned either). |
Originally posted by @r3m0t in #4 (comment)
The text was updated successfully, but these errors were encountered: