diff options
author | Wolfgang Müller | 2024-09-19 20:44:15 +0200 |
---|---|---|
committer | Wolfgang Müller | 2024-09-19 20:44:15 +0200 |
commit | ce4de1c73e93319e1d87719bbb98731dbc699681 (patch) | |
tree | fc203b07e5bc99dd29a2a40408fd0a62c2ea9a71 | |
parent | f6c418b0974f3cc70ac9685bbec67e0e6d797b9f (diff) | |
download | later-ce4de1c73e93319e1d87719bbb98731dbc699681.tar.gz |
Use __str__ instead of __repr__ for pretty-printing WatchLaterEntry
__repr__ is supposed to compute the "official" string representation of
an object [1] and not a pretty-printed version, so use __str__ instead.
[1] https://docs.python.org/3.12/reference/datamodel.html#object.__repr__
-rwxr-xr-x | later | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -42,7 +42,7 @@ class WatchLaterEntry: path: str mtime: dt - def __repr__(self): + def __str__(self): def format_time(time): now = dt.now() if time < now - datetime.timedelta(days=7): |