(self)
| 223 | super().__init__(id, ttl) |
| 224 | |
| 225 | def __repr__(self) -> str: |
| 226 | expiry_time = self.creation_time + self.ttl |
| 227 | remaining = max(0, expiry_time - time.monotonic()) |
| 228 | return ( |
| 229 | f"{self.__class__.__name__}(" |
| 230 | f"id={self.id}, " |
| 231 | f"ttl={self.ttl}, " |
| 232 | f"creation_time={self.creation_time}, " |
| 233 | f"expires_at={expiry_time}, " |
| 234 | f"remaining={remaining:.1f}s, " |
| 235 | f"expired={self.is_expired()}" |
| 236 | f")" |
| 237 | ) |
| 238 | |
| 239 | def __eq__(self, other) -> bool: |
| 240 | """ |
nothing calls this directly
no test coverage detected