r/programming • u/pyrefly_kyle • 13d ago
Pyrefly 1.5: 100% Conformance and 40% Faster
https://github.com/pyrefly-org/pyrefly/releases/tag/1.5.0Link to release: https://github.com/pyrefly-org/pyrefly/releases/tag/1.5.0
Pyrefly (a Python type checker and language server) has just release version 1.5. It brings large performance optimizations and new features like Tensor Types six months after the first stable release.
Highlights (Taken from release):
- 100% typing spec conformance. Pyrefly now passes all 146 test files in the typing conformance suite. Some of these fixes change how names in annotations resolve; see Behavior Changes.
- Faster checks. v1.5.0 checks 40% faster than v1.4.1 and uses 9% less memory across the 71 benchmarks in Astral's ty_benchmark and the python-type-checking benchmark suites. (Tested on an M5 Max MacBook Pro with 18 threads.)
- A new
hintseverity. Diagnostics that were previously IDE-only are now regular error kinds at a newhintseverity:unused-import,unused-parameter,unused-variable,unreachable, andinactive-code(formerlyunreachable-code). By default, they appear in your editor and are hidden frompyrefly checkoutput, but you can configure them inpyrefly.toml, silence them with suppression comments, or promote them to errors like any other error kind.
95
Upvotes
18
u/tristan957 13d ago
How does this compare to Ty for people?
13
u/GameCounter 12d ago
I have a pretty big legacy Django codebase (roughly 200k lines of code).
We had a bakeoff and I ended picking pyrefly as our typechecker for CI, which has worked better than I anticipated.
I've opened about 3 issues and literally all of them were picked up and resolved in a matter of days, which really impressed me.
1
u/M4mb0 7d ago
Great achievement, and the best type checker imo.
Hope for full python 3.15 support in the next release!
1
u/[deleted] 9d ago
[removed] — view removed comment