(self)
| 322 | super().__init__(id, ttl) |
| 323 | |
| 324 | def __repr__(self) -> str: |
| 325 | expiry_time = self.creation_time + self.ttl |
| 326 | remaining = max(0, expiry_time - time.monotonic()) |
| 327 | return ( |
| 328 | f"{self.__class__.__name__}(" |
| 329 | f"id={self.id}, " |
| 330 | f"ttl={self.ttl}, " |
| 331 | f"creation_time={self.creation_time}, " |
| 332 | f"expires_at={expiry_time}, " |
| 333 | f"remaining={remaining:.1f}s, " |
| 334 | f"expired={self.is_expired()}" |
| 335 | f")" |
| 336 | ) |
| 337 | |
| 338 | def __eq__(self, other) -> bool: |
| 339 | """ |
nothing calls this directly
no test coverage detected