MCPcopy
hub / github.com/redis/redis-py / __repr__

Method __repr__

redis/maint_notifications.py:374–386  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

372 super().__init__(id, NodeFailedOverNotification.DEFAULT_TTL)
373
374 def __repr__(self) -> str:
375 expiry_time = self.creation_time + self.ttl
376 remaining = max(0, expiry_time - time.monotonic())
377 return (
378 f"{self.__class__.__name__}("
379 f"id={self.id}, "
380 f"ttl={self.ttl}, "
381 f"creation_time={self.creation_time}, "
382 f"expires_at={expiry_time}, "
383 f"remaining={remaining:.1f}s, "
384 f"expired={self.is_expired()}"
385 f")"
386 )
387
388 def __eq__(self, other) -> bool:
389 """

Callers

nothing calls this directly

Calls 3

maxClass · 0.85
monotonicMethod · 0.80
is_expiredMethod · 0.45

Tested by

no test coverage detected