We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
optype.numpy.To{}ND
@pavyamsiri discovered in jorenham/scipy-stubs#195 (comment) a false negative in mypy with recursive sequences. This causes e.g. onp.ToFloatND = "huh" to be accepted by mypy.
onp.ToFloatND = "huh"
I raised this in python/mypy#18184.
In the meantime we'll need a workaround, as this directly affects a very large portion of the annotations in scipy-stubs.
scipy-stubs
The text was updated successfully, but these errors were encountered:
import numpy._typing as _npt import optype.numpy as onp def f_np(x: _npt._ArrayLikeFloat_co) -> None: ... def f_onp(x: onp.ToFloatND) -> None: ... f_np("duck") # OK: rejected f_onp("duck") # FAIL: accepted (mypy only; pyright rejects)
Sorry, something went wrong.
reproduce #194
1b93c2e
jorenham
Successfully merging a pull request may close this issue.
@pavyamsiri discovered in jorenham/scipy-stubs#195 (comment) a false negative in mypy with recursive sequences. This causes e.g.
onp.ToFloatND = "huh"
to be accepted by mypy.I raised this in python/mypy#18184.
In the meantime we'll need a workaround, as this directly affects a very large portion of the annotations in
scipy-stubs
.The text was updated successfully, but these errors were encountered: