From f4cf76752f9c9c833c6ba910d31f4082fb9d6a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= <6774676+eumiro@users.noreply.github.com> Date: Thu, 17 Aug 2023 20:20:32 +0200 Subject: [PATCH] Remove useless int casting --- pendulum/_helpers.py | 2 +- pendulum/date.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pendulum/_helpers.py b/pendulum/_helpers.py index 1b586d31..6f365c54 100644 --- a/pendulum/_helpers.py +++ b/pendulum/_helpers.py @@ -92,7 +92,7 @@ def local_time( for a particular transition type. """ year = EPOCH_YEAR - seconds = int(math.floor(unix_time)) + seconds = math.floor(unix_time) # Shift to a base year that is 400-year aligned. if seconds >= 0: diff --git a/pendulum/date.py b/pendulum/date.py index 772f1ac1..493ee4e0 100644 --- a/pendulum/date.py +++ b/pendulum/date.py @@ -84,7 +84,7 @@ def age(self) -> int: @property def quarter(self) -> int: - return int(math.ceil(self.month / 3)) + return math.ceil(self.month / 3) # String Formatting