Skip to content

Commit

Permalink
Replaced NotImplementedError with NotImplemented
Browse files Browse the repository at this point in the history
Signed-off-by: fazledyn-or <[email protected]>
  • Loading branch information
fazledyn-or authored and aquaherd committed Nov 16, 2023
1 parent c5c6d44 commit 8af3927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hamster/lib/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __sub__(self, other):
elif isinstance(other, pdt.date):
return timedelta.from_pdt(self.to_pdt() - other)
else:
raise NotImplementedError("subtract {}".format(type(other)))
return NotImplemented

@classmethod
def parse(cls, s):
Expand Down Expand Up @@ -250,7 +250,7 @@ def __sub__(self, other):
elif isinstance(other, datetime):
return timedelta.from_pdt(self.to_pdt() - other)
else:
raise NotImplementedError("subtract {}".format(type(other)))
return NotImplemented

def __str__(self):
if self.tzinfo:
Expand Down

0 comments on commit 8af3927

Please sign in to comment.