Skip to content

Commit ca32d1f

Browse files
committed
remove several internal-only methods from offsets.pyi
1 parent 2b0279e commit ca32d1f

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

pandas-stubs/_libs/tslibs/offsets.pyi

+2-23
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ from pandas.tseries.holiday import AbstractHolidayCalendar
2626
_DatetimeT = TypeVar("_DatetimeT", bound=datetime)
2727
_TimedeltaT = TypeVar("_TimedeltaT", bound=timedelta)
2828

29-
prefix_mapping: dict[str, type]
30-
31-
class ApplyTypeError(TypeError): ...
32-
3329
class BaseOffset:
3430
n: int
3531
def __init__(self, n: int = ..., normalize: bool = ...) -> None: ...
@@ -96,9 +92,6 @@ class BaseOffset:
9692
def __getstate__(self): ...
9793
@property
9894
def nanos(self) -> int: ...
99-
def onOffset(self, dt: datetime) -> bool: ...
100-
def isAnchored(self) -> bool: ...
101-
def is_anchored(self) -> bool: ...
10295

10396
class SingleConstructorOffset(BaseOffset):
10497
def __reduce__(self): ...
@@ -110,8 +103,6 @@ class Tick(SingleConstructorOffset):
110103
@property
111104
def nanos(self) -> int: ...
112105

113-
def delta_to_tick(delta: timedelta) -> Tick: ...
114-
115106
class Day(Tick): ...
116107
class Hour(Tick): ...
117108
class Minute(Tick): ...
@@ -123,19 +114,14 @@ class Nano(Tick): ...
123114
class RelativeDeltaOffset(BaseOffset):
124115
def __init__(self, n: int = ..., normalize: bool = ..., **kwds: Any) -> None: ...
125116

126-
class BusinessMixin(SingleConstructorOffset):
127-
def __init__(
128-
self, n: int = ..., normalize: bool = ..., offset: timedelta = ...
129-
) -> None: ...
130-
131117
# Changed from implementation because it is not allowed for `PeriodDtype`
132118
class BusinessDay(BaseOffset):
133119
def __init__(
134120
self, n: int = ..., normalize: bool = ..., offset: timedelta = ...
135121
) -> None: ...
136122
def __reduce__(self): ...
137123

138-
class BusinessHour(BusinessMixin):
124+
class BusinessHour(SingleConstructorOffset):
139125
def __init__(
140126
self,
141127
n: int = ...,
@@ -209,7 +195,7 @@ class FY5253(FY5253Mixin): ...
209195
class FY5253Quarter(FY5253Mixin): ...
210196
class Easter(SingleConstructorOffset): ...
211197

212-
class _CustomBusinessMonth(BusinessMixin):
198+
class _CustomBusinessMonth(SingleConstructorOffset):
213199
def __init__(
214200
self,
215201
n: int = ...,
@@ -274,10 +260,3 @@ BMonthBegin = BusinessMonthBegin
274260
CBMonthEnd = CustomBusinessMonthEnd
275261
CBMonthBegin = CustomBusinessMonthBegin
276262
CDay = CustomBusinessDay
277-
278-
def roll_qtrday(
279-
other: datetime, n: int, month: int, day_opt: str, modby: int
280-
) -> int: ...
281-
def shift_months(
282-
dtindex: npt.NDArray[np.int64], months: int, day_opt: str | None = ...
283-
) -> npt.NDArray[np.int64]: ...

0 commit comments

Comments
 (0)