diff --git a/pandas-stubs/_libs/tslibs/offsets.pyi b/pandas-stubs/_libs/tslibs/offsets.pyi index 6ac91ce8..4de2003b 100644 --- a/pandas-stubs/_libs/tslibs/offsets.pyi +++ b/pandas-stubs/_libs/tslibs/offsets.pyi @@ -26,8 +26,6 @@ from pandas.tseries.holiday import AbstractHolidayCalendar _DatetimeT = TypeVar("_DatetimeT", bound=datetime) _TimedeltaT = TypeVar("_TimedeltaT", bound=timedelta) -prefix_mapping: dict[str, type] - class ApplyTypeError(TypeError): ... class BaseOffset: @@ -96,9 +94,6 @@ class BaseOffset: def __getstate__(self): ... @property def nanos(self) -> int: ... - def onOffset(self, dt: datetime) -> bool: ... - def isAnchored(self) -> bool: ... - def is_anchored(self) -> bool: ... class SingleConstructorOffset(BaseOffset): def __reduce__(self): ... @@ -110,8 +105,6 @@ class Tick(SingleConstructorOffset): @property def nanos(self) -> int: ... -def delta_to_tick(delta: timedelta) -> Tick: ... - class Day(Tick): ... class Hour(Tick): ... class Minute(Tick): ... @@ -123,11 +116,6 @@ class Nano(Tick): ... class RelativeDeltaOffset(BaseOffset): def __init__(self, n: int = ..., normalize: bool = ..., **kwds: Any) -> None: ... -class BusinessMixin(SingleConstructorOffset): - def __init__( - self, n: int = ..., normalize: bool = ..., offset: timedelta = ... - ) -> None: ... - # Changed from implementation because it is not allowed for `PeriodDtype` class BusinessDay(BaseOffset): def __init__( @@ -135,7 +123,7 @@ class BusinessDay(BaseOffset): ) -> None: ... def __reduce__(self): ... -class BusinessHour(BusinessMixin): +class BusinessHour(SingleConstructorOffset): def __init__( self, n: int = ..., @@ -209,7 +197,7 @@ class FY5253(FY5253Mixin): ... class FY5253Quarter(FY5253Mixin): ... class Easter(SingleConstructorOffset): ... -class _CustomBusinessMonth(BusinessMixin): +class _CustomBusinessMonth(SingleConstructorOffset): def __init__( self, n: int = ..., @@ -274,10 +262,3 @@ BMonthBegin = BusinessMonthBegin CBMonthEnd = CustomBusinessMonthEnd CBMonthBegin = CustomBusinessMonthBegin CDay = CustomBusinessDay - -def roll_qtrday( - other: datetime, n: int, month: int, day_opt: str, modby: int -) -> int: ... -def shift_months( - dtindex: npt.NDArray[np.int64], months: int, day_opt: str | None = ... -) -> npt.NDArray[np.int64]: ...