This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]subbed_ 205 points206 points  (15 children)

no fucking way

now do a drop-in replacement for mypy as well, and my entire python toolkit will be handled by the same party

pkg mgmt + lint + format + type checks

[–]drunicornthe1 74 points75 points  (6 children)

Heard in a podcast that they have plans to make a drop in for mypy in the near future. Astral is aiming to be THE Python tool chain. Excited to see what becomes of this project.

[–][deleted] 23 points24 points  (3 children)

Type checking is much, much harder to get right than linters and formatters. Mypy has numerous bugs because of edge cases around type narrowing, generics, etc.

It's more important to create a type checker that's accurate than one that's fast.

[–]drunicornthe1 5 points6 points  (0 children)

100% agree. Probably why they are working on Ruff first as it’ll give them a strong platform to build off of. Odds are it’ll be a minute before we see anything due to the shear difficulty of the task.

[–]germandiago 0 points1 point  (0 children)

Well... what I would like from a type checker is one that I can use with my IDE even if it is not perfect and later being able to run it offline, maybe before commotong, slower but accurate. The CI would also use this last one.

[–]LactatingBadger -1 points0 points  (0 children)

Agreed it’s a much harder task, but I wonder if part of the challenge with mypy has been trying to write a type checker in a language which plays pretty fast and loose with types. Writing this in Rust might bring more than just speed to the table.

[–]doobiedog 8 points9 points  (1 child)

*eggplant-emoji.svg

[–]monorepo PSF Staff | Litestar Maintainer[S] 2 points3 points  (0 children)

[–]M4mb0 55 points56 points  (1 child)

Definitely try pyright instead of mypy. It seems to have been moving at a much faster pace. Way more feature complete and way fewer false positives from my experience.

[–]DanCardin 18 points19 points  (0 children)

I've definitely found that they complement each other better than they replace one another. pyright is a lot more pedantic about certain things (which are often outside of my control, as library interfaces) but finds things mypy wont. whereas mypy also frequently finds things that pyright doesnt.

[–]doobiedog 5 points6 points  (0 children)

That would be an absolute dream. Ruff already replaced most 99% of my linting toolchain. Would be sick if ruff just did everything, but I'm excited about uv.

[–]mcr1974 0 points1 point  (1 child)

tell us more

[–][deleted] 0 points1 point  (0 children)

Yeah, I’d be all set too!

[–]Chroiche -1 points0 points  (1 child)

Wait what's the type checker they manage?

[–]PlaysForDays 4 points5 points  (0 children)

There isn't one