Skip to content

Commit

Permalink
Mypy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
C4ptainCrunch committed Oct 23, 2019
1 parent 8b62f4a commit 8793894
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ics/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ def end(self) -> Arrow:
else:
return None

def _timedelta_ceiling(self, value, precision):
if precision != 'day' or (value.seconds == 0 and value.microseconds == 0):
return value
return timedelta(days=value.days + 1)

@end.setter
def end(self, value: ArrowLike):
value = get_arrow(value)
Expand All @@ -220,6 +215,11 @@ def end(self, value: ArrowLike):
self._duration = None
self._begin_precision = precision

def _timedelta_ceiling(self, value, precision):
if precision != 'day' or (value.seconds == 0 and value.microseconds == 0):
return value
return timedelta(days=value.days + 1)

@property
def duration(self) -> Optional[timedelta]:
"""Get or set the duration of the event.
Expand Down

0 comments on commit 8793894

Please sign in to comment.