Skip to content

Commit

Permalink
Merge pull request #118 from evanpurkhiser/black-maths
Browse files Browse the repository at this point in the history
black: Maths spacing
  • Loading branch information
kiorky authored Oct 30, 2024
2 parents 7bc3d62 + b54f812 commit 73a2b9e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/croniter/croniter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<pre>((?P<he>(({WEEKDAYS})(-({WEEKDAYS}))?)").format(WEEKDAYS=WEEKDAYS) +
(r"|(({MONTHS})(-({MONTHS}))?)|\w+)#)|l)(?P<last>\d+)$").format(MONTHS=MONTHS)
(r"^(?P<pre>((?P<he>(({WEEKDAYS})(-({WEEKDAYS}))?)").format(WEEKDAYS=WEEKDAYS)
+ (r"|(({MONTHS})(-({MONTHS}))?)|\w+)#)|l)(?P<last>\d+)$").format(MONTHS=MONTHS)
)
re_star = re.compile("[*]")
hash_expression_re = re.compile(
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 73a2b9e

Please sign in to comment.