Skip to content

Test ty on the CI #1222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
twoertwein opened this issue May 19, 2025 · 6 comments
Open

Test ty on the CI #1222

twoertwein opened this issue May 19, 2025 · 6 comments

Comments

@twoertwein
Copy link
Member

If ty becomes as popular as ruff, it would be good to test against ty on the CI.

Since ty is still in an alpha stage, this should at most be an optional check for now.

@loicdiridollou
Copy link
Member

It’s been on my radar for a while since it is likely to get a lot of traction as ruff did.
I tried it this morning and it was not able to complete on pandas-stubs folder and raised almost 3000 diagnostics on the tests folder.
For example with a data frame df, the following will match to Unknown: df.ewm().mean(). I don’t know if it is missing features with the project being so young. Let’s keep in on the radar but may be too early to put it on CI.
If agreed I will add it to our optional checks but likely not to be useful for a bit of time.

@loicdiridollou
Copy link
Member

https://github.com/pandas-dev/pandas-stubs/actions/runs/15123998412/job/42512468714?pr=1224
This is what it would be on the tests so there is a bit of noise but not crazy.

@loicdiridollou
Copy link
Member

https://github.com/pandas-dev/pandas-stubs/actions/runs/15124251567/job/42513218163?pr=1224
This is what it would be on the pandas-stubs folder so there is a ton of noise. Seems to me like it may be a parameter issue or just a lack of support, for example for Series[int], subscribing the type does not seem well supported yet.

@twoertwein
Copy link
Member Author

Thank you for demonstrating the impact! Seems like we should wait quite a bit :)

@loicdiridollou
Copy link
Member

loicdiridollou commented May 24, 2025

FWIW I have also experimented with pyrefly since it was realeased a few days ago and same spirit (written in rust) but it is also a little too young to be inserted in our CI. It raises weird issues like:

ERROR /Users/loic.diridollou/Documents/Code/pandas-stubs/main/pandas-stubs/
core/series.pyi:1673:22-57: Expected a type form, got instance of `UnionType` [not-a-type]

for the following line: def __rpow__(self, other: num | _ListLike | Series[S1]) -> Series[S1]: ..., the issue being flagged is the | that makes it a Union.

So yes those are super interesting yet do not support pandas very well.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented May 27, 2025

What might be worth doing for both those projects is to suggest that they test their projects on pandas-stubs. Feel free to do so.

Both mypy and pyright run their CI against pandas-stubs and it's a way for them to pick up any changes (good or bad) in behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants