From b54f812cfeaf4d8f4e05a7474a5b80737c413b9a Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Wed, 30 Oct 2024 13:07:21 -0400 Subject: [PATCH] black: Maths spacing --- src/croniter/croniter.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/croniter/croniter.py b/src/croniter/croniter.py index 24dc81e..943a681 100644 --- a/src/croniter/croniter.py +++ b/src/croniter/croniter.py @@ -42,10 +42,10 @@ def is_32bit(): # Method 3: Check maxsize (sys.maxint in Python 2) try: # Python 2 - is_small_maxsize = sys.maxint <= 2**32 + is_small_maxsize = sys.maxint <= 2 ** 32 except AttributeError: # Python 3 - is_small_maxsize = sys.maxsize <= 2**32 + is_small_maxsize = sys.maxsize <= 2 ** 32 # Evaluate all available methods is_32 = False @@ -86,8 +86,8 @@ def is_32bit(): MONTHS = "|".join(M_ALPHAS.keys()) star_or_int_re = re.compile(r"^(\d+|\*)$") special_dow_re = re.compile( - (r"^(?P
((?P(({WEEKDAYS})(-({WEEKDAYS}))?)").format(WEEKDAYS=WEEKDAYS) +
-    (r"|(({MONTHS})(-({MONTHS}))?)|\w+)#)|l)(?P\d+)$").format(MONTHS=MONTHS)
+    (r"^(?P
((?P(({WEEKDAYS})(-({WEEKDAYS}))?)").format(WEEKDAYS=WEEKDAYS)
+    + (r"|(({MONTHS})(-({MONTHS}))?)|\w+)#)|l)(?P\d+)$").format(MONTHS=MONTHS)
 )
 re_star = re.compile("[*]")
 hash_expression_re = re.compile(
@@ -125,8 +125,7 @@ def is_32bit():
 
 
 def timedelta_to_seconds(td):
-    return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) \
-        / 10**6
+    return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10 ** 6) / 10 ** 6
 
 
 def datetime_to_timestamp(d):