From f7ba4bc74d420a7920f27bc97f0a3a889da00a95 Mon Sep 17 00:00:00 2001 From: Peter van 't Zand Date: Wed, 15 Jul 2015 14:06:03 +0200 Subject: [PATCH] the function should be a class method instead of instance method because it doesn't perform an action on the instance --- src/croniter/croniter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/croniter/croniter.py b/src/croniter/croniter.py index 758df18..b24d17e 100644 --- a/src/croniter/croniter.py +++ b/src/croniter/croniter.py @@ -167,7 +167,8 @@ class croniter(object): return result - def _timedelta_to_seconds(self, td): + @classmethod + def _timedelta_to_seconds(cls, td): """ Converts a 'datetime.timedelta' object `td` into seconds contained in the duration