Skip to content

Commit

Permalink
Use calendar module constants
Browse files Browse the repository at this point in the history
  • Loading branch information
gbtami committed Jan 11, 2025
1 parent 83ed04f commit 7c467ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 8 additions & 1 deletion server/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@
from tournaments import new_tournament
from logger import log

from calendar import (
MONDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY
)

MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY = range(7)
Plan = namedtuple("Plan", "freq, date, hour, variant, is960, base, inc, byo, duration")

SHIELDS = ["crazyhouse960", "atomic960", "kingofthehill960", "3check960", "makruk"]
Expand Down
2 changes: 0 additions & 2 deletions tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from const import SCHEDULE_MAX_DAYS, TFreq
from scheduler import new_scheduled_tournaments, MONTHLY_VARIANTS, SHIELDS, Scheduler

MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY = range(7)

# Crazhouse960 Shield scheduled at second MONDAY of month
SHIELD_ZH_2021_09 = (
TFreq.SHIELD,
Expand Down

0 comments on commit 7c467ed

Please sign in to comment.