Settings

Theme

Pyrefly v1.0.0 is here (Type Checker / Language Server for Python) [video]

youtube.com

10 points by kinto a month ago · 8 comments

Reader

kintoOP a month ago

Hi, Pyrefly developer here. It's been almost a year since our alpha has been released and we've been working hard towards a stable release. We're excited to announce general availability today!

See the official blog post for more details: https://pyrefly.org/blog/v1.0/

ainch a month ago

I'm glad it's 1.0, but for me the most exciting thing is the tensor shape typing they mention in the blogpost. I've been looking for a good solution to this for ages, and the Pyrefly implementation seems to have everything I'd like - incl. static typing (unlike jaxtyping's runtime-only setup), and shape inference (so passing a 2,3 tensor through a 3,10 linear layer gives you a 2,10 output tensor).

ducdetronquito a month ago

Congrats on the release, and thanks for this nice tool !

I migrated a small python/django backend project at work from basedpyright to pyrefly 1.0 yesterday to try it, and the migration was painless: just running pyrefly init converted the basedpyright config to a pyrefly config in the pyproject.toml.

The typecheking phase went from ~3/4s to 0.5s which is very nice when ran with pre-commit hooks. It also caught some unnecessary type conversion that basedpyright missed (ex: calling str(value) on a value that is already a string).

I haven't toyed too much with the LSP in zed, but I did not feel anything was missing for now.

I will try to migrate larger backends in the following weeks to see how it goes.

Anyway, it's very cool to see a new stable and fast typechecker for Python ! :)

adityamwagh a month ago

It’s a huge memory hog. The other day it was using 2.5GB!

  • kintoOP a month ago

    curious if you’ve tried 1.0! we’ve shipped a lot of memory improvements recently. if you have, please make a github issue and we can investigate.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection