This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty
Pyrefly: A new type checker and IDE experience for Python
21–30 of 177 posts
Re: Pyrefly: A new type checker and IDE experience for Python
#22The way these type checkers get fast is usually by not supporting the crazy rich reality of realworld python code.
The reason we're stuck on mypy at work is because it's the only type checker that has a plugin for Django that properly manages to type check its crazy runtime generated methods.
I wish more python tooling took the TS approach of "what's in the wild IS the language", as opposed to a "we only typecheck the constructs we think you SHOULD be using".
Re: Pyrefly: A new type checker and IDE experience for Python
#23Earlier quoted context omitted.
Yes. If you want runtime validation of data you’re taking in people recommended pydantic. If you’re looking for runtime validation within your own code I’ve seen people use beartype, though to be honest I don’t personally understand the value added from it
...or Marshmallow, which allows one to do many complex validations in a relatively trivial manner.
Re: Pyrefly: A new type checker and IDE experience for Python
#24To repeat an earlier comment of mine from the launch of uv on hn (tl; dr: these new type checkers never support django): The way these type checkers get fast is usually by not supporting the crazy rich reality of realworld python code. The reason we're stuck on mypy at work is because it's the only type checker that has a plugin for Django that properly manages to type check its crazy runtime generated methods. I wis…
Re: Pyrefly: A new type checker and IDE experience for Python
#25Its probably cool n' all but fb isnt getting any of my attention. They'd need to come up with AGI for that to happen, and even then I'd shrug it off.
Re: Pyrefly: A new type checker and IDE experience for Python
#26Earlier quoted context omitted.
...or Marshmallow, which allows one to do many complex validations in a relatively trivial manner.
On one hand, I feel like I've been in a coma since covid because I've just been coasting along with Marshmallow and jsonschema, but on the other hand it's like a lot of the major advances have been in the past couple years. Apparently pydantic got a big version update in 2023? And now all these competing static type checkers?
Re: Pyrefly: A new type checker and IDE experience for Python
#27This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty
Because this has been tested at Meta / Facebook scale which means it's faster for any Python codebase massive and small. Since Meta built this, I have confidence this will be maintained more than others and I will use this and ask for Pyrefly experience in the future.
Re: Pyrefly: A new type checker and IDE experience for Python
#28This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty
Re: Pyrefly: A new type checker and IDE experience for Python
#29This is very cool but why wouldn’t they just contribute to uv and ruff and ty https://github.com/astral-sh/ty
Re: Pyrefly: A new type checker and IDE experience for Python
#30To repeat an earlier comment of mine from the launch of uv on hn (tl; dr: these new type checkers never support django): The way these type checkers get fast is usually by not supporting the crazy rich reality of realworld python code. The reason we're stuck on mypy at work is because it's the only type checker that has a plugin for Django that properly manages to type check its crazy runtime generated methods. I wis…
2. Astral indicated already they plan to just add direct support for Django and other popular languages.
3. As people replied to similar comments on the previous threads (maybe to you?): that's not why ty is fast and why mypy is slow. It's also an easy claim to disprove: run both without plugins and you'll see ty is still 100x+ faster.