diff --git a/source/hab_task.py b/source/hab_task.py index eda546f..66ebfc2 100644 --- a/source/hab_task.py +++ b/source/hab_task.py @@ -17,7 +17,9 @@ from dates import parse_date_utc from task import CharacterAttribute, ChecklistItem, Difficulty, Task -class HabTask(object): + +class HabTask(): + """Class to hold data for a single Habitica task """ def __init__(self, task_dict=None): """ Initialise the task. @@ -74,8 +76,8 @@ def due(self): return '' @property - #When did the daily start running? (That is, is it active now?) def starting(self): + """When did the daily start running? (That is, is it active now?)""" from dateutil import parser import datetime if self.__task_dict['type'] == 'daily': diff --git a/source/main.py b/source/main.py index 427dc7d..0bf7900 100644 --- a/source/main.py +++ b/source/main.py @@ -463,16 +463,16 @@ def sync_hab2todo_todo(hab, tod): habDict['priority'] = 1 try: - dueNow = tod.due.date() + due_now = tod.due.date() except: - dueNow = '' + due_now = '' try: - dueOld = parse_date_utc(hab.date).date() + due_old = parse_date_utc(hab.date).date() except: - dueOld = '' + due_old = '' - if dueOld != dueNow: - habDict['date'] = str(dueNow) + if due_old != due_now: + habDict['date'] = str(due_now) new_hab = HabTask(habDict) return new_hab