Skip to content

Commit

Permalink
Merge pull request #108 from evanpurkhiser/consistent-docstrings
Browse files Browse the repository at this point in the history
Always use `"""` for docstrings
  • Loading branch information
kiorky authored Oct 30, 2024
2 parents e312e39 + bc74164 commit a8f65cd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/croniter/croniter.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,12 @@ def _get_next(self, ret_type=None, start_time=None, is_prev=None, update_current
# or for combining multiple croniters into single
# dates feed using 'itertools' module
def all_next(self, ret_type=None, start_time=None, update_current=None):
'''Generator of all consecutive dates. Can be used instead of
implicit call to __iter__, whenever non-default
'ret_type' has to be specified.
'''
"""
Returns a generator yielding consecutive dates.
May be used instead of an implicit call to __iter__ whenever a
non-default `ret_type` needs to be specified.
"""
# In a Python 3.7+ world: contextlib.suppress and contextlib.nullcontext could be used instead
try:
while True:
Expand All @@ -455,7 +457,9 @@ def all_next(self, ret_type=None, start_time=None, update_current=None):
raise

def all_prev(self, ret_type=None, start_time=None, update_current=None):
'''Generator of all previous dates.'''
"""
Returns a generator yielding previous dates.
"""
try:
while True:
self._is_prev = True
Expand Down

0 comments on commit a8f65cd

Please sign in to comment.