Skip to content

Commit

Permalink
Resolved conflicts, updated dunder methods to compare datetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
jlhitzeman committed Jul 18, 2024
1 parent 9104f69 commit 4feaf13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions distill/core/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,25 @@ def __lt__(self, other):
if isinstance(other, Log):
return self.id < other.id
if isinstance(other, datetime):
return self.id.get_datetime() < other.now()
return self.id.get_datetime() < other

def __le__(self, other):
if isinstance(other, Log):
return self.id <= other.id
if isinstance(other, datetime):
return self.id.get_datetime() <= other.now()
return self.id.get_datetime() <= other

def __gt__(self, other):
if isinstance(other, Log):
return self.id > other.id
if isinstance(other, datetime):
return self.id.get_datetime() > other.now()
return self.id.get_datetime() > other

def __ge__(self, other):
if isinstance(other, Log):
return self.id > other.id
if isinstance(other, datetime):
return self.id.get_datetime() >= other.now()
return self.id.get_datetime() >= other

def __ne__(self, other):
if isinstance(other, Log):
Expand Down

0 comments on commit 4feaf13

Please sign in to comment.