Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

black: list / dict / tuple formatting #116

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions src/croniter/croniter.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,9 @@ class croniter(object):
(1, 12),
(0, 6),
(0, 59),
(1970, 2099)
)
DAYS = (
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
(1970, 2099),
)
DAYS = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)

ALPHACONV = (
{}, # 0: min
Expand All @@ -201,7 +199,7 @@ class croniter(object):
# 5: second
{},
# 6: year
{}
{},
)

LOWMAP = (
Expand All @@ -211,7 +209,7 @@ class croniter(object):
{0: 1},
{7: 0},
{},
{}
{},
)

LEN_MEANS_ALL = (
Expand All @@ -221,7 +219,7 @@ class croniter(object):
12,
7,
60,
130
130,
)

def __init__(
Expand Down Expand Up @@ -699,14 +697,15 @@ def proc_second(d):
d += relativedelta(second=0)
return False, d

procs = [proc_year,
proc_month,
proc_day_of_month,
(proc_day_of_week_nth if nth_weekday_of_month
else proc_day_of_week),
proc_hour,
proc_minute,
proc_second]
procs = [
proc_year,
proc_month,
proc_day_of_month,
(proc_day_of_week_nth if nth_weekday_of_month else proc_day_of_week),
proc_hour,
proc_minute,
proc_second,
]

while abs(year - current_year) <= self._max_years_between_matches:
next = False
Expand Down Expand Up @@ -1396,6 +1395,8 @@ def expand(self, efl, idx, expr, hash_id=None, match="", **kw):
)


EXPANDERS = OrderedDict([
("hash", HashExpander),
])
EXPANDERS = OrderedDict(
[
("hash", HashExpander),
]
)
Loading