Skip to content

Commit 863d269

Browse files
committed
User doc decorator for __doc__ in pandas/tseries/offsets.py
1 parent bdf969c commit 863d269

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

pandas/tseries/offsets.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,11 +1188,12 @@ class BusinessMonthBegin(MonthOffset):
11881188
_day_opt = "business_start"
11891189

11901190

1191+
@doc(bound="bound")
11911192
class _CustomBusinessMonth(_CustomMixin, BusinessMixin, MonthOffset):
11921193
"""
11931194
DateOffset subclass representing custom business month(s).
11941195
1195-
Increments between %(bound)s of month dates.
1196+
Increments between {bound} of month dates.
11961197
11971198
Parameters
11981199
----------
@@ -1284,14 +1285,12 @@ def apply(self, other):
12841285
return result
12851286

12861287

1287-
@Substitution(bound="end")
1288-
@Appender(_CustomBusinessMonth.__doc__)
1288+
@doc(_CustomBusinessMonth, bound="end")
12891289
class CustomBusinessMonthEnd(_CustomBusinessMonth):
12901290
_prefix = "CBM"
12911291

12921292

1293-
@Substitution(bound="beginning")
1294-
@Appender(_CustomBusinessMonth.__doc__)
1293+
@doc(_CustomBusinessMonth, bound="beginning")
12951294
class CustomBusinessMonthBegin(_CustomBusinessMonth):
12961295
_prefix = "CBMS"
12971296

0 commit comments

Comments
 (0)