Skip to content

Commit 7eb63bd

Browse files
author
cloudboat
committed
REF: Replace @substitution with hardcoded docstring in strftime
1 parent 3ce2133 commit 7eb63bd

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

pandas/core/arrays/datetimelike.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@
8181
PerformanceWarning,
8282
)
8383
from pandas.util._decorators import (
84-
Appender,
85-
Substitution,
8684
cache_readonly,
8785
)
8886
from pandas.util._exceptions import find_stack_level
@@ -1774,18 +1772,14 @@ class DatelikeOps(DatetimeLikeArrayMixin):
17741772
Common ops for DatetimeIndex/PeriodIndex, but not TimedeltaIndex.
17751773
"""
17761774

1777-
@Substitution(
1778-
URL="https://docs.python.org/3/library/datetime.html"
1779-
"#strftime-and-strptime-behavior"
1780-
)
17811775
def strftime(self, date_format: str) -> npt.NDArray[np.object_]:
17821776
"""
17831777
Convert to Index using specified date_format.
17841778
17851779
Return an Index of formatted strings specified by date_format, which
17861780
supports the same string format as the python standard library. Details
17871781
of the string format can be found in `python string format
1788-
doc <%(URL)s>`__.
1782+
doc <https://docs.python.org/3/library/datetime.html>`__.
17891783
17901784
Formats supported by the C `strftime` API but not by the python string format
17911785
doc (such as `"%%R"`, `"%%r"`) are not officially supported and should be
@@ -2258,7 +2252,6 @@ def _round(self, freq, mode, ambiguous, nonexistent):
22582252
result = result.view(self._ndarray.dtype)
22592253
return self._simple_new(result, dtype=self.dtype)
22602254

2261-
@Appender((_round_doc + _round_example).format(op="round"))
22622255
def round(
22632256
self,
22642257
freq,
@@ -2363,7 +2356,6 @@ def round(
23632356
"""
23642357
return self._round(freq, RoundTo.NEAREST_HALF_EVEN, ambiguous, nonexistent)
23652358

2366-
@Appender((_round_doc + _floor_example).format(op="floor"))
23672359
def floor(
23682360
self,
23692361
freq,
@@ -2468,7 +2460,6 @@ def floor(
24682460
"""
24692461
return self._round(freq, RoundTo.MINUS_INFTY, ambiguous, nonexistent)
24702462

2471-
@Appender((_round_doc + _ceil_example).format(op="ceil"))
24722463
def ceil(
24732464
self,
24742465
freq,

0 commit comments

Comments
 (0)