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 17
17
from dates import parse_date_utc
18
18
from task import CharacterAttribute , ChecklistItem , Difficulty , Task
19
19
20
- class HabTask (object ):
20
+
21
+ class HabTask ():
22
+ """Class to hold data for a single Habitica task """
21
23
def __init__ (self , task_dict = None ):
22
24
""" Initialise the task.
23
25
@@ -74,8 +76,8 @@ def due(self):
74
76
return ''
75
77
76
78
@property
77
- #When did the daily start running? (That is, is it active now?)
78
79
def starting (self ):
80
+ """When did the daily start running? (That is, is it active now?)"""
79
81
from dateutil import parser
80
82
import datetime
81
83
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):
463
463
habDict ['priority' ] = 1
464
464
465
465
try :
466
- dueNow = tod .due .date ()
466
+ due_now = tod .due .date ()
467
467
except :
468
- dueNow = ''
468
+ due_now = ''
469
469
try :
470
- dueOld = parse_date_utc (hab .date ).date ()
470
+ due_old = parse_date_utc (hab .date ).date ()
471
471
except :
472
- dueOld = ''
472
+ due_old = ''
473
473
474
- if dueOld != dueNow :
475
- habDict ['date' ] = str (dueNow )
474
+ if due_old != due_now :
475
+ habDict ['date' ] = str (due_now )
476
476
477
477
new_hab = HabTask (habDict )
478
478
return new_hab
You can’t perform that action at this time.
0 commit comments