Skip to content

Commit 2a89396

Browse files
committed
chore: formatting
1 parent 37691eb commit 2a89396

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

chores/core.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
import logging
22
from datetime import datetime, timedelta, timezone
3-
from dateutil.tz import tzlocal
4-
from .messages import VolunteeringReminderNotification
53
from functools import total_ordering
6-
from django.core.mail import EmailMessage
7-
from .models import Chore, ChoreNotification
84

95
import humanize
106
from croniter import croniter
7+
from dateutil.tz import tzlocal
8+
from django.core.mail import EmailMessage
9+
10+
from .messages import VolunteeringReminderNotification
11+
from .models import Chore, ChoreNotification
12+
1113
logger = logging.getLogger(__name__)
1214

1315
HUMAN_DATETIME_STRING = "%H:%M:%S %d/%m/%Y"
1416
local_timezone = tzlocal()
1517

18+
1619
class BaseNudge(object):
1720
"""Base class for all nudge types with common functionality."""
1821

@@ -229,7 +232,6 @@ def get_num_days_of_earliest_reminder(self):
229232
return max([0] + [reminder.when["days_before"] for reminder in self.reminders])
230233

231234

232-
233235
class RecurrentEventGenerator(object):
234236
def __init__(self, starting_time, crontab, take_one_every):
235237
self.starting_time = Time.from_datetime(
@@ -257,9 +259,6 @@ def iter_events_from_to(self, aggregator, ts_from, ts_to):
257259
yield ChoreEvent(aggregator, self.event_time)
258260

259261

260-
261-
262-
263262
ALL_CHORE_TYPES = [
264263
BasicChore,
265264
]
@@ -321,6 +320,7 @@ def get_chore_type_class(chore):
321320
return chore_class
322321
raise Exception(f'Cannot find Python class for chore of type "{chore.class_type}"')
323322

323+
324324
def build_chore_instance(chore):
325325
chore_class = get_chore_type_class(chore)
326326
return chore_class(chore.id, chore.name, chore.description, **chore.configuration)
@@ -339,6 +339,7 @@ def calculate_reminder_time(event, when):
339339
)
340340
return reminder_time
341341

342+
342343
@total_ordering
343344
class Time(object):
344345
# Internally represents time in UTC

0 commit comments

Comments
 (0)