Python lsp: Pyright isn't good #23376
Replies: 84 comments 11 replies
-
Yeah, We are working on language plugins at the moment, so, in the not-so-distant future, someone can just add these servers as plugins, but I do think we should swap out our provided one for a bettter one. |
Beta Was this translation helpful? Give feedback.
-
Indeed they did build a language server protocol for Ruff already |
Beta Was this translation helpful? Give feedback.
-
AFAICT, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
See that python-dotenv is installed, along with pydantic in my env - (pip list) but I guess pyright is not checking for packages in the project-directory/.venv ??? |
Beta Was this translation helpful? Give feedback.
-
You need this file.
|
Beta Was this translation helpful? Give feedback.
-
There's an issue #8541 about resolving modules with Pyright. |
Beta Was this translation helpful? Give feedback.
-
I see this problem last for months, but there's still no real solution? |
Beta Was this translation helpful? Give feedback.
-
This should actually solve the problem - for some reason, during the migration of our documentation, we lost our Python docs that mentions this config file. I've quickly dumped the old Python docs contents into the As a side note, I want to say that we are going to be doing more for Python here shortly - we recognize just how important this language is, being one of the top most-used languages, and we want to improve for Python devs in Zed. |
Beta Was this translation helpful? Give feedback.
-
I tried it, but no luck. I use poetry in my python project, does it matter? |
Beta Was this translation helpful? Give feedback.
-
To add to the corpus of Pyright issues, in
Additionally, in
I have done no custom configuration. I believe these shouldn't be showing issues as they work as expected and are standard practices. |
Beta Was this translation helpful? Give feedback.
-
@newtome8888 run {
"venvPath": "/Users/username/Library/Caches/pypoetry/virtualenvs",
"venv": "projectname-p0LYZhue-py3.11"
} |
Beta Was this translation helpful? Give feedback.
-
Just to mention, there is a setting in poetry tells poetry to install the venv within the project: Which would stabilize where the |
Beta Was this translation helpful? Give feedback.
-
Using pyright is literally painful. |
Beta Was this translation helpful? Give feedback.
-
There is any simple way to replace pyright with mypy? Pyright being the default is kinda a deal breaker for me. |
Beta Was this translation helpful? Give feedback.
-
You can use mypy with pylsp that's the other language server provided out of the box. |
Beta Was this translation helpful? Give feedback.
-
for macOS using pylsp with ruff, here is my setup:
Install python-lsp-ruff:
|
Beta Was this translation helpful? Give feedback.
-
I can rely on that. I've give a try to By the way, I actually have to use Not sure if this is the best config but it works as intended. Just my 2 cents experience. |
Beta Was this translation helpful? Give feedback.
-
I have Zed with basedpyright & ruff stuck showing Python 2.7.18
Everything is working correctly - imports from the venv work, errors are correct, but at bottom right of Zed it always shows 2.7.18 instead of 3.12.8 that's used in the venv |
Beta Was this translation helpful? Give feedback.
-
This was released recently: |
Beta Was this translation helpful? Give feedback.
-
Probably is better than pyright, after all I can't think anything worse
than pyright for this. It would be nice if ty was eventually a potential
alternative for zed.
Em ter., 13 de mai. de 2025 21:07, Sebastian ***@***.***>
escreveu:
… This was released recently:
https://github.com/astral-sh/ty
—
Reply to this email directly, view it on GitHub
<#23376 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2J57UVOYM3QZESIVRUUWL26KCLNAVCNFSM6AAAAABYDXFFX6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMJTG43TMMI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
It seems that at this time there is no extension for ty in Zed. |
Beta Was this translation helpful? Give feedback.
-
Besides Astral's ty, there's also Meta's pyrefly, another type checker and language server written in Rust that might be worth keeping an eye on. |
Beta Was this translation helpful? Give feedback.
-
I have an extension for Ty but I'm not going to open a PR until Ty is usable. I'm expecting things will change to some extent. |
Beta Was this translation helpful? Give feedback.
-
There's an extension for |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Solved the problem with pyright/pyflakes.
|
Beta Was this translation helpful? Give feedback.
-
i'm sure pyright has it's supporters but it's really rough having to learn how to configure something you hate just to get it to go away |
Beta Was this translation helpful? Give feedback.
-
Having used several python lsps, basedpyright and zuban were my choices. ty is still premature, and pyrefly was too resource heavy for me. Zuban is written in Rust as well, mypy compatible, and passes more entries in pyting conformance test. If it were not for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Check for existing issues
Describe the feature
it should be pylsp. The pyright has issues about recognize libraries installed
If applicable, add mockups / screenshots to help present your vision of the feature
No response
Beta Was this translation helpful? Give feedback.
All reactions