> 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.
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!
Easy to install with pipx.
As with pyright, I’ve noticed `--createstubs` helps against slowness when working in modules that import large untyped packages.
Faster typechecking for Python is very much needed. But this project seems like it was built in a hackathon -- it is not a true standalone typechecker.
My research agrees with your assessment. While I'm sure it's a lot faster (I think the README implies it's one or two magnitudes faster) it just doesn't sit right to me that it's essentially just transpiles to Erg and delegates the actual hard work to the Erg typechecker. This works, but I feel like it fundamentally limits what Pylyzer is capable of, and how much control it really has over the underlying type checking process, as to it, the Erg type checker is essentially a black box.
It's a wrapper (a non-trivial one, to its credit -- especially considering everything is a wrapper if you look at it the right way -- but still a wrapper) rather than an actual full solution.
There's also really only one maintainer (who seems to do a decent job, but I don't seem to recall much more than just bug fixes). Makes me hesitant to really depend on it sticking around long-term or having features that meaningfully progress in the future.
If you're already making that then building a type checker wrapper on top of it makes perfect sense.
> 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
One consideration there would probably be how many committal decisions mypy has made. One of the main reasons a new tool might be better than an old one is that it can be built fresh, with all the lessons learned but (essentially) none of the baggage of bad design decisions.
Another thing I've also weighed is that developing any kind of static analysis tool whose source code is not in the language it analyzes (such as Ruff) immediately blocks you off from a large portion of maintainers. Your maintainers cannot be your end users unless they work with both Python and Rust. While Python is definitely one or more magnitudes slower than Rust, I can't imagine that mypy is at the point where the language choice itself is the only bottleneck.
Now that I have ruff giving me a bunch of instant feedback, pyright has become a bit of a distraction due to the lag.
Granted, maybe there's value in this just being a wrapper, and it's best to just deduplicate the work. However, it just sits a little wrong to me that it's not type checking Python, it's doing a transpilation step of sorts and type checking that.
This would increase the value as the results would be easier to integrate with other tools (for example, you can post SARIF to GitHub).
So I just continued using pylsp with the ruff extension.
"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."
But it does cause some awkwardness.