Skip to content

Commit

Permalink
Remove unnecessary or self._ret_type
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Oct 30, 2024
1 parent 010b321 commit 3fff4d6
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 @@ -289,13 +289,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 @@ -445,7 +445,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 @@ -459,7 +459,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 3fff4d6

Please sign in to comment.