Skip to content

Commit fb18255

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

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

pandas-stubs/_libs/tslibs/offsets.pyi

+2-21
Original file line numberDiff line numberDiff line change
@@ -26,8 +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-
3129
class ApplyTypeError(TypeError): ...
3230

3331
class BaseOffset:
@@ -96,9 +94,6 @@ class BaseOffset:
9694
def __getstate__(self): ...
9795
@property
9896
def nanos(self) -> int: ...
99-
def onOffset(self, dt: datetime) -> bool: ...
100-
def isAnchored(self) -> bool: ...
101-
def is_anchored(self) -> bool: ...
10297

10398
class SingleConstructorOffset(BaseOffset):
10499
def __reduce__(self): ...
@@ -110,8 +105,6 @@ class Tick(SingleConstructorOffset):
110105
@property
111106
def nanos(self) -> int: ...
112107

113-
def delta_to_tick(delta: timedelta) -> Tick: ...
114-
115108
class Day(Tick): ...
116109
class Hour(Tick): ...
117110
class Minute(Tick): ...
@@ -123,19 +116,14 @@ class Nano(Tick): ...
123116
class RelativeDeltaOffset(BaseOffset):
124117
def __init__(self, n: int = ..., normalize: bool = ..., **kwds: Any) -> None: ...
125118

126-
class BusinessMixin(SingleConstructorOffset):
127-
def __init__(
128-
self, n: int = ..., normalize: bool = ..., offset: timedelta = ...
129-
) -> None: ...
130-
131119
# Changed from implementation because it is not allowed for `PeriodDtype`
132120
class BusinessDay(BaseOffset):
133121
def __init__(
134122
self, n: int = ..., normalize: bool = ..., offset: timedelta = ...
135123
) -> None: ...
136124
def __reduce__(self): ...
137125

138-
class BusinessHour(BusinessMixin):
126+
class BusinessHour(SingleConstructorOffset):
139127
def __init__(
140128
self,
141129
n: int = ...,
@@ -209,7 +197,7 @@ class FY5253(FY5253Mixin): ...
209197
class FY5253Quarter(FY5253Mixin): ...
210198
class Easter(SingleConstructorOffset): ...
211199

212-
class _CustomBusinessMonth(BusinessMixin):
200+
class _CustomBusinessMonth(SingleConstructorOffset):
213201
def __init__(
214202
self,
215203
n: int = ...,
@@ -274,10 +262,3 @@ BMonthBegin = BusinessMonthBegin
274262
CBMonthEnd = CustomBusinessMonthEnd
275263
CBMonthBegin = CustomBusinessMonthBegin
276264
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)