Hacker News new | ask | show | jobs
by deckiedan 793 days ago
I'm really excited for this.

Yes, pyright is fast enough, 99% of the time. But the install story, requiring npm etc, is a bit of a pain.

A rust based version with similar install ease as ruff would be great.

Additionally, if it is a lot faster, I think it should unlock more possibilities for eager search to improve the lsp.

Quite often the pyright lsp doesn't find auto imports - there's just too much many places to search.

I'm following this with great interest!

4 comments

Python LSP Server works great, is easier to install and even offers some optional extensions.

https://github.com/python-lsp/python-lsp-server

This unfortunately has `docstring-to-markdown` as one of its dependencies, which is a pain to install behind corporate pip proxies because it's under GPL.
In the interim, check out basedpyright [1]. It's an up-to-date fork of pyright with some improvements, less arbitrary limitations, and does not require npm to install.

[1] https://github.com/detachhead/basedpyright

I was thrilled to learn about basedpyright recently. It does a great job of filling in some of the missing parts of pyright that MS deemed a better fit for pylance – which is a vs code exclusive.

Easy to install with pipx.

As with pyright, I’ve noticed `--createstubs` helps against slowness when working in modules that import large untyped packages.

Do you have experience with it in production? Is it a drop-in replacement with respect to existing pyright configuration?
Agree that this looks useful. I actively do not want NPM in my toolchain.
Pyright requires npm?! Wtf!
It's written by Microsoft in TypeScript.
Which is a very sensible decision given that VSCode is Typescript, and also it means it can run on the web. Also Typescript is a much nicer and faster language than Python.

But it does cause some awkwardness.