You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated on pytype's repo the focus of work is now elsewhere and the library won't support Python versions after 3.12. This is essentially deprecated then, and so we should look to remove it from our CI pipeline in place of alternatives (or nothing). The alternatives they provide to consider are:
My quick experiment with ty was that it was very fast and found a number of things that should be addressed. It's still beta but I wonder about adding it as a non-required test anyway since the cost is so low.
@garciadias has started on #8868, my feeling was to use mypy AND ty together, but we can discuss further. If ty is fast and accurate maybe it can be a precommit hook instead.
Thank you for the suggestion, @aymuos15. I will take a look at Pyrefly and see how it fits with respect to the other tools. Thank you for your comments, @ericspod. I will go through that PR today. 🙏🏾
Activity
aymuos15 commentedon May 21, 2026
Would vote for pyrefly here as they are out of beta and have tensor shape support.
Although I do not find that much of an issue with ty either. However, still beta.
These are also much faster than mypy/pyrighy.
ericspod commentedon May 21, 2026
My quick experiment with ty was that it was very fast and found a number of things that should be addressed. It's still beta but I wonder about adding it as a non-required test anyway since the cost is so low.
aymuos15 commentedon May 21, 2026
Agreed!
ericspod commentedon May 27, 2026
@garciadias has started on #8868, my feeling was to use mypy AND ty together, but we can discuss further. If ty is fast and accurate maybe it can be a precommit hook instead.
Further CICD Cleanup (#8867)
aymuos15 commentedon May 27, 2026
Just out of curiosity, why not pyrefly? Especially because it's not out of beta.
The reason Would help for my personal stuff too :)
ericspod commentedon May 27, 2026
We haven't really evaluated things entirely so there's no reason why not, I just hadn't looked at it. ty was just really fast and the first I got to.
aymuos15 commentedon May 27, 2026
Okay, thanks! Ty sounds good to me. It's my default for prototyping.
garciadias commentedon May 29, 2026
Thank you for the suggestion, @aymuos15. I will take a look at Pyrefly and see how it fits with respect to the other tools. Thank you for your comments, @ericspod. I will go through that PR today. 🙏🏾
feat: replace mypy and pytype with pyrefly for static type analysis
fix: address PR Project-MONAI#8868 review feedback (Project-MONAI#8865)
fix: address PR Project-MONAI#8868 review feedback (Project-MONAI#8865)
fix: address PR Project-MONAI#8868 review feedback (Project-MONAI#8865)
fix: remove mypy; suppress enum invalid-annotation globally (Project-…
feat: replace mypy and pytype with pyrefly for static type analysis (P…