-
-
Notifications
You must be signed in to change notification settings - Fork 141
remove several internal-only methods from offsets.pyi #1163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: ... | ||
Comment on lines
-99
to
-100
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove quite a while ago |
||
def is_anchored(self) -> bool: ... | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. deprecated |
||
|
||
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,19 +116,14 @@ 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: ... | ||
Comment on lines
-126
to
-129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was only subclassed by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
|
||
# Changed from implementation because it is not allowed for `PeriodDtype` | ||
class BusinessDay(BaseOffset): | ||
def __init__( | ||
self, n: int = ..., normalize: bool = ..., offset: timedelta = ... | ||
) -> 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]: ... | ||
Comment on lines
-278
to
-283
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. private |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private