File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1717from dates import parse_date_utc
1818from task import CharacterAttribute , ChecklistItem , Difficulty , Task
1919
20- class HabTask (object ):
20+
21+ class HabTask ():
22+ """Class to hold data for a single Habitica task """
2123 def __init__ (self , task_dict = None ):
2224 """ Initialise the task.
2325
@@ -74,8 +76,8 @@ def due(self):
7476 return ''
7577
7678 @property
77- #When did the daily start running? (That is, is it active now?)
7879 def starting (self ):
80+ """When did the daily start running? (That is, is it active now?)"""
7981 from dateutil import parser
8082 import datetime
8183 if self .__task_dict ['type' ] == 'daily' :
Original file line number Diff line number Diff line change @@ -463,16 +463,16 @@ def sync_hab2todo_todo(hab, tod):
463463 habDict ['priority' ] = 1
464464
465465 try :
466- dueNow = tod .due .date ()
466+ due_now = tod .due .date ()
467467 except :
468- dueNow = ''
468+ due_now = ''
469469 try :
470- dueOld = parse_date_utc (hab .date ).date ()
470+ due_old = parse_date_utc (hab .date ).date ()
471471 except :
472- dueOld = ''
472+ due_old = ''
473473
474- if dueOld != dueNow :
475- habDict ['date' ] = str (dueNow )
474+ if due_old != due_now :
475+ habDict ['date' ] = str (due_now )
476476
477477 new_hab = HabTask (habDict )
478478 return new_hab
You can’t perform that action at this time.
0 commit comments