Skip to content

Commit cadea0a

Browse files
jbrockmendelclaude
andcommitted
CLN: fix mypy stub and doc build for quarter deprecation
Add warn_quarter parameter to parsing.pyi stub. Add :okwarning: to v0.17.0.rst ipython block that uses quarter strings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5c41e65 commit cadea0a

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

doc/source/whatsnew/v0.17.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ v0.17.0 can parse them as below. It works on ``DatetimeIndex`` also.
668668
New behavior:
669669

670670
.. ipython:: python
671+
:okwarning:
671672
672673
pd.Timestamp("2012Q2")
673674
pd.Timestamp("2014")

pandas/_libs/tslibs/parsing.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def parse_datetime_string_with_reso(
1616
freq: str | None = ...,
1717
dayfirst: bool | None = ...,
1818
yearfirst: bool | None = ...,
19+
warn_quarter: bool = ...,
1920
) -> tuple[datetime, str]: ...
2021
def _does_string_look_like_datetime(py_string: str) -> bool: ...
2122
def quarter_to_myear(year: int, quarter: int, freq: str) -> tuple[int, int]: ...

0 commit comments

Comments
 (0)