|
16 | 16 | import pandas.compat as compat
|
17 | 17 | from pandas.compat import range
|
18 | 18 | from pandas.errors import AbstractMethodError
|
19 |
| -from pandas.util._decorators import cache_readonly |
| 19 | +from pandas.util._decorators import cache_readonly, Substitution, Appender |
20 | 20 |
|
21 | 21 | from pandas.core.dtypes.generic import ABCPeriod
|
22 | 22 |
|
@@ -973,7 +973,7 @@ class BusinessMonthBegin(MonthOffset):
|
973 | 973 | class _CustomBusinessMonth(_CustomMixin, BusinessMixin, MonthOffset):
|
974 | 974 | """
|
975 | 975 | DateOffset subclass representing one custom business month, incrementing
|
976 |
| - between [BEGIN/END] of month dates. |
| 976 | + between %(bound)s of month dates. |
977 | 977 |
|
978 | 978 | Parameters
|
979 | 979 | ----------
|
@@ -1053,18 +1053,15 @@ def apply(self, other):
|
1053 | 1053 | return result
|
1054 | 1054 |
|
1055 | 1055 |
|
| 1056 | +@Substitution(bound="end") |
| 1057 | +@Appender(_CustomBusinessMonth.__doc__) |
1056 | 1058 | class CustomBusinessMonthEnd(_CustomBusinessMonth):
|
1057 |
| - # TODO(py27): Replace condition with Subsitution after dropping Py27 |
1058 |
| - if _CustomBusinessMonth.__doc__: |
1059 |
| - __doc__ = _CustomBusinessMonth.__doc__.replace('[BEGIN/END]', 'end') |
1060 | 1059 | _prefix = 'CBM'
|
1061 | 1060 |
|
1062 | 1061 |
|
| 1062 | +@Substitution(bound="beginning") |
| 1063 | +@Appender(_CustomBusinessMonth.__doc__) |
1063 | 1064 | class CustomBusinessMonthBegin(_CustomBusinessMonth):
|
1064 |
| - # TODO(py27): Replace condition with Subsitution after dropping Py27 |
1065 |
| - if _CustomBusinessMonth.__doc__: |
1066 |
| - __doc__ = _CustomBusinessMonth.__doc__.replace('[BEGIN/END]', |
1067 |
| - 'beginning') |
1068 | 1065 | _prefix = 'CBMS'
|
1069 | 1066 |
|
1070 | 1067 |
|
|
0 commit comments