Skip to content

Commit 6e4b036

Browse files
committed
use doc replace Appender
1 parent 30724b9 commit 6e4b036

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pandas/tseries/offsets.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
shift_month,
3434
)
3535
from pandas.errors import AbstractMethodError
36-
from pandas.util._decorators import Appender, Substitution, cache_readonly
36+
from pandas.util._decorators import cache_readonly, doc
3737

3838
from pandas.core.dtypes.inference import is_list_like
3939

@@ -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)