Skip to content

Conversation

@cmp0xff
Copy link
Contributor

@cmp0xff cmp0xff commented Dec 3, 2025

Towards #1522, which is too big.

collections.abc.Callable has no default value for the arguments. Replacing all bare Callable with Callable[..., Any], so that pyright_strict is happier.

@loicdiridollou
Copy link
Member

Maybe a little bit of a question but should we obsess with pyright_strict and would it become a requirement in the future? It is known to be quite difficult to mix pandas and pyright strict so wondering if that would cause a heavy burden for future PRs? Open to different views @Dr-Irv @MarcoGorelli

Copy link
Member

@loicdiridollou loicdiridollou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thanks @cmp0xff, just want to get inputs about the place of pyright strict in our workflow.

@MarcoGorelli
Copy link
Member

It is known to be quite difficult to mix pandas and pyright strict

true, but maybe that's the kind of difficulty which PRs like this one take a step towards resolving?

@cmp0xff
Copy link
Contributor Author

cmp0xff commented Dec 4, 2025

Indeed, pyright_strict errors will reduce from 3264 in main to 1701 in this pipeline (for now) if #1522 is finished

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Dec 4, 2025

Maybe a little bit of a question but should we obsess with pyright_strict and would it become a requirement in the future? It is known to be quite difficult to mix pandas and pyright strict so wondering if that would cause a heavy burden for future PRs? Open to different views @Dr-Irv @MarcoGorelli

I don't think we'll ever be able to completely support pyright strict because of things like Series[Any], but the closer we can get to doing it, the better. I'm hopeful that we can get to a point where there are only 1 or 2 pyright strict errors that we just can't support, and then we document that, and make pyright strict part of the regular CI with a config that says those couple of errors are allowed.

@MarcoGorelli
Copy link
Member

i thought (hoped 🤞 ) that #1232 address the Series[Any] issue

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Dec 4, 2025

i thought (hoped 🤞 ) that #1232 address the Series[Any] issue

Possibly. But there are current 1436 "partially unknown" types of errors, and those might be difficult to handle. But those may be due to places where we use Series rather than Series[Any] as an argument, or list rather than list[Any], etc.

@cmp0xff
Copy link
Contributor Author

cmp0xff commented Dec 4, 2025

Series should now be fine, thanks to #1232. Sequence etc. are not, we need Sequence[Any], etc.

@loicdiridollou
Copy link
Member

Okay just wanted to make sure this was a route we wanted to take since there is quite a bit of work to make it happen, thanks @cmp0xff !

@loicdiridollou loicdiridollou merged commit 67a1748 into pandas-dev:main Dec 5, 2025
16 checks passed
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

Successfully merging this pull request may close these issues.

4 participants