From bc741644c3fc0f6f97c946b68a153a8e9ee7e994 Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Tue, 29 Oct 2024 20:56:13 -0400 Subject: [PATCH] Always use `"""` for docstrings --- src/croniter/croniter.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/croniter/croniter.py b/src/croniter/croniter.py index 54dbeb0..6489ae4 100644 --- a/src/croniter/croniter.py +++ b/src/croniter/croniter.py @@ -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: @@ -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