Check if this notification has expired based on its TTL and creation time. Returns: bool: True if the notification has expired, False otherwise
(self)
| 75 | self.expire_at = self.creation_time + self.ttl |
| 76 | |
| 77 | def is_expired(self) -> bool: |
| 78 | """ |
| 79 | Check if this notification has expired based on its TTL |
| 80 | and creation time. |
| 81 | |
| 82 | Returns: |
| 83 | bool: True if the notification has expired, False otherwise |
| 84 | """ |
| 85 | return time.monotonic() > (self.creation_time + self.ttl) |
| 86 | |
| 87 | @abstractmethod |
| 88 | def __repr__(self) -> str: |
no test coverage detected