Skip to content

Commit

Permalink
Merge pull request #107 from evanpurkhiser/unused-self-ret-type
Browse files Browse the repository at this point in the history
Remove unnecessary `or self._ret_type`
  • Loading branch information
kiorky authored Oct 30, 2024
2 parents 9b650e5 + 3fff4d6 commit 7bc3d62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/croniter/croniter.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ def _alphaconv(cls, index, key, expressions):
def get_next(self, ret_type=None, start_time=None, update_current=True):
if start_time and self._expand_from_start_time:
raise ValueError("start_time is not supported when using expand_from_start_time = True.")
return self._get_next(ret_type or self._ret_type,
return self._get_next(ret_type=ret_type,
start_time=start_time,
is_prev=False,
update_current=update_current)

def get_prev(self, ret_type=None, start_time=None, update_current=True):
return self._get_next(ret_type or self._ret_type,
return self._get_next(ret_type=ret_type,
start_time=start_time,
is_prev=True,
update_current=update_current)
Expand Down Expand Up @@ -436,7 +436,7 @@ def all_next(self, ret_type=None, start_time=None, update_current=None):
try:
while True:
self._is_prev = False
yield self._get_next(ret_type or self._ret_type,
yield self._get_next(ret_type=ret_type,
start_time=start_time, update_current=update_current)
start_time = None
except CroniterBadDateError:
Expand All @@ -452,7 +452,7 @@ def all_prev(self, ret_type=None, start_time=None, update_current=None):
try:
while True:
self._is_prev = True
yield self._get_next(ret_type or self._ret_type,
yield self._get_next(ret_type=ret_type,
start_time=start_time, update_current=update_current)
start_time = None
except CroniterBadDateError:
Expand Down

0 comments on commit 7bc3d62

Please sign in to comment.