From ef2c35eaeeeb448aad70d759ec030fc344edd8f6 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Tue, 14 Feb 2023 22:21:04 -0500 Subject: [PATCH] Removed unneeded pareenthesis --- toot/tui/utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/toot/tui/utils.py b/toot/tui/utils.py index e2855c4..cfc0778 100644 --- a/toot/tui/utils.py +++ b/toot/tui/utils.py @@ -37,19 +37,19 @@ def time_ago(value: datetime) -> datetime: now = datetime.now().astimezone() delta = now.timestamp() - value.timestamp() - if (delta < 1): + if delta < 1: return "now" - if (delta < 8 * DAY): - if (delta < MINUTE): + if delta < 8 * DAY: + if delta < MINUTE: return f"{math.floor(delta / SECOND)}".rjust(2, " ") + "s" - if (delta < HOUR): + if delta < HOUR: return f"{math.floor(delta / MINUTE)}".rjust(2, " ") + "m" - if (delta < DAY): + if delta < DAY: return f"{math.floor(delta / HOUR)}".rjust(2, " ") + "h" return f"{math.floor(delta / DAY)}".rjust(2, " ") + "d" - if (delta < 53 * WEEK): # not exactly correct but good enough as a boundary + if delta < 53 * WEEK: # not exactly correct but good enough as a boundary return f"{math.floor(delta / WEEK)}".rjust(2, " ") + "w" return ">1y"