Live data from Hacker News

Pylyzer – A fast static code analyzer and language server for Python

github.com

1–10 of 27 posts

Re: Pylyzer – A fast static code analyzer and language server for Python

#2
I will be a happy clam when it can check `Protocol`s.

> What is the difference from Ruff? Ruff, like pylyzer, is a static code analysis tool for Python written in Rust, but Ruff is a linter and pylyzer is a type checker & language server. pylyzer does not perform linting, and Ruff does not perform type checking.

Re: Pylyzer – A fast static code analyzer and language server for Python

#4
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!

Re: Pylyzer – A fast static code analyzer and language server for Python

#5

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 s…

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

Re: Pylyzer – A fast static code analyzer and language server for Python

#6

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 s…

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

Do you have experience with it in production? Is it a drop-in replacement with respect to existing pyright configuration?

Re: Pylyzer – A fast static code analyzer and language server for Python

#7
Hopefully it can be used easily as a library. I have multiple use cases for programmatically operating on typed ASTs. MyPy plugins are very limited and most other analyzers have no such extensibility.

> Limitations [...] pylyzer (= Erg's type system) has its own type declarations for the Python standard APIs

I wonder why https://github.com/python/typeshed could not be used

Re: Pylyzer – A fast static code analyzer and language server for Python

#8
I’ve been keeping an eye on this but haven’t had the chance to try it out. Anyone have first hand experience of how it compares to pyright in reality?

Now that I have ruff giving me a bunch of instant feedback, pyright has become a bit of a distraction due to the lag.

Re: Pylyzer – A fast static code analyzer and language server for Python

#10

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 s…

Agree that this looks useful. I actively do not want NPM in my toolchain.
Post reply on HN