Skip to content

DOC: fix PR02 for pandas.tseries.offsets.* #59485

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

Merged
merged 4 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.set_eng_float_format RT03,SA01" \
-i "pandas.testing.assert_extension_array_equal SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
-i "pandas.tseries.offsets.BQuarterBegin PR02" \
-i "pandas.tseries.offsets.BQuarterBegin.freqstr SA01" \
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.BQuarterBegin.n GL08" \
Expand All @@ -445,7 +444,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BYearBegin.nanos GL08" \
-i "pandas.tseries.offsets.BYearBegin.normalize GL08" \
-i "pandas.tseries.offsets.BYearBegin.rule_code GL08" \
-i "pandas.tseries.offsets.BYearEnd PR02" \
-i "pandas.tseries.offsets.BYearEnd.freqstr SA01" \
-i "pandas.tseries.offsets.BYearEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.BYearEnd.month GL08" \
Expand Down Expand Up @@ -534,7 +532,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.normalize GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.rule_code GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.weekmask GL08" \
-i "pandas.tseries.offsets.DateOffset PR02" \
-i "pandas.tseries.offsets.DateOffset.freqstr SA01" \
-i "pandas.tseries.offsets.DateOffset.is_on_offset GL08" \
-i "pandas.tseries.offsets.DateOffset.n GL08" \
Expand All @@ -547,14 +544,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Day.nanos SA01" \
-i "pandas.tseries.offsets.Day.normalize GL08" \
-i "pandas.tseries.offsets.Day.rule_code GL08" \
-i "pandas.tseries.offsets.Easter PR02" \
-i "pandas.tseries.offsets.Easter.freqstr SA01" \
-i "pandas.tseries.offsets.Easter.is_on_offset GL08" \
-i "pandas.tseries.offsets.Easter.n GL08" \
-i "pandas.tseries.offsets.Easter.nanos GL08" \
-i "pandas.tseries.offsets.Easter.normalize GL08" \
-i "pandas.tseries.offsets.Easter.rule_code GL08" \
-i "pandas.tseries.offsets.FY5253 PR02" \
-i "pandas.tseries.offsets.FY5253.freqstr SA01" \
-i "pandas.tseries.offsets.FY5253.get_rule_code_suffix GL08" \
-i "pandas.tseries.offsets.FY5253.get_year_end GL08" \
Expand All @@ -566,7 +561,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.FY5253.startingMonth GL08" \
-i "pandas.tseries.offsets.FY5253.variation GL08" \
-i "pandas.tseries.offsets.FY5253.weekday GL08" \
-i "pandas.tseries.offsets.FY5253Quarter PR02" \
-i "pandas.tseries.offsets.FY5253Quarter.freqstr SA01" \
-i "pandas.tseries.offsets.FY5253Quarter.get_rule_code_suffix GL08" \
-i "pandas.tseries.offsets.FY5253Quarter.get_weeks GL08" \
Expand All @@ -580,14 +574,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.FY5253Quarter.variation GL08" \
-i "pandas.tseries.offsets.FY5253Quarter.weekday GL08" \
-i "pandas.tseries.offsets.FY5253Quarter.year_has_extra_week GL08" \
-i "pandas.tseries.offsets.Hour PR02" \
-i "pandas.tseries.offsets.Hour.freqstr SA01" \
-i "pandas.tseries.offsets.Hour.is_on_offset GL08" \
-i "pandas.tseries.offsets.Hour.n GL08" \
-i "pandas.tseries.offsets.Hour.nanos SA01" \
-i "pandas.tseries.offsets.Hour.normalize GL08" \
-i "pandas.tseries.offsets.Hour.rule_code GL08" \
-i "pandas.tseries.offsets.LastWeekOfMonth PR02,SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth.freqstr SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth.is_on_offset GL08" \
-i "pandas.tseries.offsets.LastWeekOfMonth.n GL08" \
Expand All @@ -596,28 +589,24 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.LastWeekOfMonth.rule_code GL08" \
-i "pandas.tseries.offsets.LastWeekOfMonth.week GL08" \
-i "pandas.tseries.offsets.LastWeekOfMonth.weekday GL08" \
-i "pandas.tseries.offsets.Micro PR02" \
-i "pandas.tseries.offsets.Micro.freqstr SA01" \
-i "pandas.tseries.offsets.Micro.is_on_offset GL08" \
-i "pandas.tseries.offsets.Micro.n GL08" \
-i "pandas.tseries.offsets.Micro.nanos SA01" \
-i "pandas.tseries.offsets.Micro.normalize GL08" \
-i "pandas.tseries.offsets.Micro.rule_code GL08" \
-i "pandas.tseries.offsets.Milli PR02" \
-i "pandas.tseries.offsets.Milli.freqstr SA01" \
-i "pandas.tseries.offsets.Milli.is_on_offset GL08" \
-i "pandas.tseries.offsets.Milli.n GL08" \
-i "pandas.tseries.offsets.Milli.nanos SA01" \
-i "pandas.tseries.offsets.Milli.normalize GL08" \
-i "pandas.tseries.offsets.Milli.rule_code GL08" \
-i "pandas.tseries.offsets.Minute PR02" \
-i "pandas.tseries.offsets.Minute.freqstr SA01" \
-i "pandas.tseries.offsets.Minute.is_on_offset GL08" \
-i "pandas.tseries.offsets.Minute.n GL08" \
-i "pandas.tseries.offsets.Minute.nanos SA01" \
-i "pandas.tseries.offsets.Minute.normalize GL08" \
-i "pandas.tseries.offsets.Minute.rule_code GL08" \
-i "pandas.tseries.offsets.MonthBegin PR02" \
-i "pandas.tseries.offsets.MonthBegin.freqstr SA01" \
-i "pandas.tseries.offsets.MonthBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.MonthBegin.n GL08" \
Expand All @@ -630,14 +619,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.MonthEnd.nanos GL08" \
-i "pandas.tseries.offsets.MonthEnd.normalize GL08" \
-i "pandas.tseries.offsets.MonthEnd.rule_code GL08" \
-i "pandas.tseries.offsets.Nano PR02" \
-i "pandas.tseries.offsets.Nano.freqstr SA01" \
-i "pandas.tseries.offsets.Nano.is_on_offset GL08" \
-i "pandas.tseries.offsets.Nano.n GL08" \
-i "pandas.tseries.offsets.Nano.nanos SA01" \
-i "pandas.tseries.offsets.Nano.normalize GL08" \
-i "pandas.tseries.offsets.Nano.rule_code GL08" \
-i "pandas.tseries.offsets.QuarterBegin PR02" \
-i "pandas.tseries.offsets.QuarterBegin.freqstr SA01" \
-i "pandas.tseries.offsets.QuarterBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.QuarterBegin.n GL08" \
Expand All @@ -652,14 +639,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.QuarterEnd.normalize GL08" \
-i "pandas.tseries.offsets.QuarterEnd.rule_code GL08" \
-i "pandas.tseries.offsets.QuarterEnd.startingMonth GL08" \
-i "pandas.tseries.offsets.Second PR02" \
-i "pandas.tseries.offsets.Second.freqstr SA01" \
-i "pandas.tseries.offsets.Second.is_on_offset GL08" \
-i "pandas.tseries.offsets.Second.n GL08" \
-i "pandas.tseries.offsets.Second.nanos SA01" \
-i "pandas.tseries.offsets.Second.normalize GL08" \
-i "pandas.tseries.offsets.Second.rule_code GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin PR02,SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin.day_of_month GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin.freqstr SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin.is_on_offset GL08" \
Expand All @@ -682,15 +668,14 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Tick.nanos SA01" \
-i "pandas.tseries.offsets.Tick.normalize GL08" \
-i "pandas.tseries.offsets.Tick.rule_code GL08" \
-i "pandas.tseries.offsets.Week PR02" \
-i "pandas.tseries.offsets.Week.freqstr SA01" \
-i "pandas.tseries.offsets.Week.is_on_offset GL08" \
-i "pandas.tseries.offsets.Week.n GL08" \
-i "pandas.tseries.offsets.Week.nanos GL08" \
-i "pandas.tseries.offsets.Week.normalize GL08" \
-i "pandas.tseries.offsets.Week.rule_code GL08" \
-i "pandas.tseries.offsets.Week.weekday GL08" \
-i "pandas.tseries.offsets.WeekOfMonth PR02,SA01" \
-i "pandas.tseries.offsets.WeekOfMonth SA01" \
-i "pandas.tseries.offsets.WeekOfMonth.freqstr SA01" \
-i "pandas.tseries.offsets.WeekOfMonth.is_on_offset GL08" \
-i "pandas.tseries.offsets.WeekOfMonth.n GL08" \
Expand Down
36 changes: 18 additions & 18 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ cdef class Hour(Tick):
"""
Offset ``n`` hours.

Parameters
Attributes
----------
n : int, default 1
The number of hours represented.
Expand Down Expand Up @@ -1183,7 +1183,7 @@ cdef class Minute(Tick):
"""
Offset ``n`` minutes.

Parameters
Attributes
----------
n : int, default 1
The number of minutes represented.
Expand Down Expand Up @@ -1219,7 +1219,7 @@ cdef class Second(Tick):
"""
Offset ``n`` seconds.

Parameters
Attributes
----------
n : int, default 1
The number of seconds represented.
Expand Down Expand Up @@ -1255,7 +1255,7 @@ cdef class Milli(Tick):
"""
Offset ``n`` milliseconds.

Parameters
Attributes
----------
n : int, default 1
The number of milliseconds represented.
Expand Down Expand Up @@ -1292,7 +1292,7 @@ cdef class Micro(Tick):
"""
Offset ``n`` microseconds.

Parameters
Attributes
----------
n : int, default 1
The number of microseconds represented.
Expand Down Expand Up @@ -1329,7 +1329,7 @@ cdef class Nano(Tick):
"""
Offset ``n`` nanoseconds.

Parameters
Attributes
----------
n : int, default 1
The number of nanoseconds represented.
Expand Down Expand Up @@ -1616,7 +1616,7 @@ class DateOffset(RelativeDeltaOffset, metaclass=OffsetMeta):
Besides, adding a DateOffsets specified by the singular form of the date
component can be used to replace certain component of the timestamp.

Parameters
Attributes
----------
n : int, default 1
The number of time periods the offset represents.
Expand Down Expand Up @@ -2506,7 +2506,7 @@ cdef class BYearEnd(YearOffset):
"""
DateOffset increments between the last business day of the year.

Parameters
Attributes
----------
n : int, default 1
The number of years represented.
Expand Down Expand Up @@ -2804,7 +2804,7 @@ cdef class BQuarterBegin(QuarterOffset):
startingMonth = 2 corresponds to dates like 2/01/2007, 5/01/2007, ...
startingMonth = 3 corresponds to dates like 3/01/2007, 6/01/2007, ...

Parameters
Attributes
----------
n : int, default 1
The number of quarters represented.
Expand Down Expand Up @@ -2886,7 +2886,7 @@ cdef class QuarterBegin(QuarterOffset):
startingMonth = 2 corresponds to dates like 2/01/2007, 5/01/2007, ...
startingMonth = 3 corresponds to dates like 3/01/2007, 6/01/2007, ...

Parameters
Attributes
----------
n : int, default 1
The number of quarters represented.
Expand Down Expand Up @@ -2984,7 +2984,7 @@ cdef class MonthBegin(MonthOffset):

MonthBegin goes to the next date which is a start of the month.

Parameters
Attributes
----------
n : int, default 1
The number of months represented.
Expand Down Expand Up @@ -3272,7 +3272,7 @@ cdef class SemiMonthBegin(SemiMonthOffset):
"""
Two DateOffset's per month repeating on the first day of the month & day_of_month.

Parameters
Attributes
----------
n : int, default 1
The number of months represented.
Expand Down Expand Up @@ -3304,7 +3304,7 @@ cdef class Week(SingleConstructorOffset):
"""
Weekly offset.

Parameters
Attributes
----------
n : int, default 1
The number of weeks represented.
Expand Down Expand Up @@ -3477,7 +3477,7 @@ cdef class WeekOfMonth(WeekOfMonthMixin):
"""
Describes monthly dates like "the Tuesday of the 2nd week of each month".

Parameters
Attributes
----------
n : int, default 1
The number of months represented.
Expand Down Expand Up @@ -3554,7 +3554,7 @@ cdef class LastWeekOfMonth(WeekOfMonthMixin):

For example "the last Tuesday of each month".

Parameters
Attributes
----------
n : int, default 1
The number of months represented.
Expand Down Expand Up @@ -3694,7 +3694,7 @@ cdef class FY5253(FY5253Mixin):
X is a specific day of the week.
Y is a certain month of the year

Parameters
Attributes
----------
n : int
The number of fiscal years represented.
Expand Down Expand Up @@ -3897,7 +3897,7 @@ cdef class FY5253Quarter(FY5253Mixin):
startingMonth = 2 corresponds to dates like 2/28/2007, 5/31/2007, ...
startingMonth = 3 corresponds to dates like 3/30/2007, 6/29/2007, ...

Parameters
Attributes
----------
n : int
The number of business quarters represented.
Expand Down Expand Up @@ -4132,7 +4132,7 @@ cdef class Easter(SingleConstructorOffset):

Right now uses the revised method which is valid in years 1583-4099.

Parameters
Attributes
----------
n : int, default 1
The number of years represented.
Expand Down