fix: Series.dt argument 'ambiguous' can be boolean #1178
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the bug
In the documentation and in practice, Series.dt.floor, Series.dt.round and Series.dt.ceil accept the argument
ambiguous
as boolean, which is however not supported inpandas-stubs
.To Reproduce
Provide a minimal runnable
pandas
example that is not properly checked by the stubs.Indicate which type checker you are using (
mypy
orpyright
).mypy
Show the error message received from that type checker while checking your example.
Please complete the following information:
OS: [e.g. Windows, Linux, MacOS]
Microsoft Windows 10 Enterprise
OS Version [e.g. 22]
10.0.19045 N/A Build 19045
python version
Python 3.13.2
version of type checker
mypy==1.15.0
version of installed
pandas-stubs
pandas-stubs==2.2.3.250308
Additional context
Add any other context about the problem here.