I love the speed advantage of pyrefly over (based)pyright but so far it doesn't seem to highlight as much as pyright does, for example it doesn't catch unreachable code like this: def fn(x: str): if x is None: x = "123" # pyright flags that as unreachable code, pyrefly does not Autocomplete for modules also doesn't work for me yet: import os os. # I'll get `ABC, `Any`, `AnyStr`, `AnyStr_co`, `BinaryIO`, ... Looking f…
Whats the expected error in the example you gave? That x can't be none because it was received as a str?
Pyrefly: Python type checker and language server in Rust
21–30 of 150 posts
Re: Pyrefly: Python type checker and language server in Rust
#22Python is starting to feel a bit like JavaScript circa 2014. Remember grunt, gulp, webpack, coffeescript, babel? Now we've got pyright, mypy, pyrefly, black, ruff, ty, flake8, poetry, uv... I used to find this kind of tooling explosion exhausting (and back then with JS it truly was), but generally speaking it's a good sign that the community is hungry to push things forward. Choice is good, as long as we keep the Uni…
The problem with the python tooling is no one can get it right. There aren't clear winners for a lot of the tooling.
Re: Pyrefly: Python type checker and language server in Rust
#23Python is starting to feel a bit like JavaScript circa 2014. Remember grunt, gulp, webpack, coffeescript, babel? Now we've got pyright, mypy, pyrefly, black, ruff, ty, flake8, poetry, uv... I used to find this kind of tooling explosion exhausting (and back then with JS it truly was), but generally speaking it's a good sign that the community is hungry to push things forward. Choice is good, as long as we keep the Uni…
Re: Pyrefly: Python type checker and language server in Rust
#24Re: Pyrefly: Python type checker and language server in Rust
#25Earlier quoted context omitted.
Yeah, there are now 3 competitors and they all written in Rust: - zuban - ty (from ruff team) - pyrefly One year ago, we had none of them, only slow options.
it'll be like python package managers and js web frameworks.... a new one every quarter
Re: Pyrefly: Python type checker and language server in Rust
#26Re: Pyrefly: Python type checker and language server in Rust
#27Earlier quoted context omitted.
Yeah, there are now 3 competitors and they all written in Rust: - zuban - ty (from ruff team) - pyrefly One year ago, we had none of them, only slow options.
Speed is one of those "Quantity has a quality all its own" things. We use very fast tools in a qualitatively different way, even though all that changed was how long it takes in seconds. It is interesting that nobody was writing these tools in C or in C++. There are obvious ergonomic reasons, but perhaps also it matters that Rust cares a lot more about types than either of those languages.
The author of Zuban started writing it back in 2020 or 2021, so it took him more than 4 years to complete it. And he is the author of Jedi, so he had prior experience already.
Re: Pyrefly: Python type checker and language server in Rust
#28Re: Pyrefly: Python type checker and language server in Rust
#29I love the speed advantage of pyrefly over (based)pyright but so far it doesn't seem to highlight as much as pyright does, for example it doesn't catch unreachable code like this: def fn(x: str): if x is None: x = "123" # pyright flags that as unreachable code, pyrefly does not Autocomplete for modules also doesn't work for me yet: import os os. # I'll get `ABC, `Any`, `AnyStr`, `AnyStr_co`, `BinaryIO`, ... Looking f…
Re: Pyrefly: Python type checker and language server in Rust
#30Earlier quoted context omitted.
it'll be like python package managers and js web frameworks.... a new one every quarter
uv works so well for the vast majority of scenarios that I don't really see a demand for further innovation in the Python package manager domain.