Skip to content

Commit ef0539f

Browse files
author
luke
committed
CLEAN dubious docstring
Fixes pandas-dev#50344
1 parent 797f23e commit ef0539f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

pandas/_libs/tslibs/offsets.pyx

+10-9
Original file line numberDiff line numberDiff line change
@@ -382,25 +382,26 @@ cdef class BaseOffset:
382382
# dict _cache
383383

384384
def __init__(self, n=1, normalize=False):
385-
n = self._validate_n(n)
386-
self.n = n
387385
"""
388-
Number of multiples of the frequency.
386+
Parameters:
387+
-----------
388+
n : int
389+
Number of multiples of the frequency.
390+
391+
normalize : boolean
392+
Whether the frequency can align with midnight.
389393
390394
Examples
391395
--------
392396
>>> pd.offsets.Hour(5).n
393397
5
394-
"""
395-
self.normalize = normalize
396-
"""
397-
Return boolean whether the frequency can align with midnight.
398398
399-
Examples
400-
--------
401399
>>> pd.offsets.Hour(5).normalize
402400
False
403401
"""
402+
n = self._validate_n(n)
403+
self.n = n
404+
self.normalize = normalize
404405
self._cache = {}
405406

406407
def __eq__(self, other) -> bool:

0 commit comments

Comments
 (0)