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
Describe the bug Series.clip currently types upper and lower arguments as accepting Optional[float]. However they also accept array-like.
To Reproduce
pandas
mypy
pyright
ser = pd.Series([1, 2, 3]) ser.clip(upper=ser)
With mypy 0.991: error: Argument "upper" to "clip" of "Series has incompatible type "Series[Any]"; expected "Optional[float]"
error: Argument "upper" to "clip" of "Series has incompatible type "Series[Any]"; expected "Optional[float]"
The text was updated successfully, but these errors were encountered:
Need to change lower and upper arguments here:
lower
upper
pandas-stubs/pandas-stubs/core/series.pyi
Line 1065 in 44f804c
And add tests.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
Series.clip currently types upper and lower arguments as accepting Optional[float]. However they also accept array-like.
To Reproduce
pandas
example that is not properly checked by the stubs.mypy
orpyright
).With mypy 0.991:
error: Argument "upper" to "clip" of "Series has incompatible type "Series[Any]"; expected "Optional[float]"
The text was updated successfully, but these errors were encountered: