-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CI 1.4.x: Typing error Overload 2 for "searchsorted" will never be used because its parameters overlap overload 1 #47569
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
Comments
Numpy 1.23.0 seems to be installed in this case which seems to be causing many other type issues. |
once #47453 is merged we can deal with any residual typing errors. |
we have not merged this. Now looking at the mypy errors on 1.4.x, I think resolving them properly would maybe require some discussion. Because the errors arise because the backport branch is using numpy 1.23.1 for typing validation and main is using the older numpy 1.22.4 for typing validation, I was hoping that it would become an issue on main and we could discuss the typing changes for that and backport whatever is needed to fix the typing issues on 1.4.x I propose for now (4 weeks on) to get typing green on the backport branch to just add ignores (or whatever) where needed. It's (hopefully) the last of the patch releases so hopefully won't create too many (or even any) merge conflicts on future backports. The codebase is not py.typed and so (imo) the type annotations in the code are not part of the release and the type annotations on main are the important ones for code robustness and consistency in development. We have pandas-stubs for public use. |
of course, we could also pin numpy to 1.22.4 here on 1.4.x? |
if we did this, we should get "Success: no issues found in 1343 source files" so I don't think there are any residual mypy errors #47569 (comment) but maybe still the one in the OP. |
I would be in favor of pinning numpy for the typing checks, should be the best solution here when taking everything into account |
sure. let's do that then. The environment.yaml is used for building the released docs. But nbd if there are issues with building the docs as these can always be re-built and uploaded to the web server. So I think if we pin in numpy in environment.yaml, that should do it. |
Could also pin numba to implicitly pin numpy (as on main) but as soon as numba is compatible with a newer numpy we get lots of typing errors. |
on main we have numba 0.55.2 and on 1.4.x we have numba 0.53.1. so not sure how the lower numba resolves to a higher numpy, so probably best (imo) to explicitly pin numpy since the mypy errors are from the numpy version rather than relying on environment resolution? |
closed in #47967 |
See https://github.com/pandas-dev/pandas/runs/7029429387?check_suite_focus=true
The text was updated successfully, but these errors were encountered: