Skip to content

Commit

Permalink
allow timestamp equality comparison with None
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Nov 29, 2023
1 parent 3beb795 commit 4c5ca0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/ipyflow/data_model/timestamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def offset(
_stmt_offset -= stmt_offset

def __eq__(self, other) -> bool:
if other is None:
return False
if not isinstance(other, Timestamp):
raise TypeError(
"cannot compare non-timestamp value %s with timestamp %s"
Expand Down

0 comments on commit 4c5ca0d

Please sign in to comment.