mirror of
https://github.com/alvierahman90/pydo.git
synced 2025-01-12 02:04:25 +00:00
allow id to be assigned at init
This commit is contained in:
parent
62726ad687
commit
813e75c74a
@ -4,7 +4,7 @@ from datetime import datetime as d
|
||||
|
||||
|
||||
class Task:
|
||||
def __init__(self, text):
|
||||
def __init__(self, text, id=None):
|
||||
# defaults
|
||||
self.completion_date = None
|
||||
self.creation_date = None
|
||||
@ -15,7 +15,7 @@ class Task:
|
||||
self.contexts = []
|
||||
self.specials = []
|
||||
# can be used by external applications. is not included in the self.__str__() function
|
||||
self.id = None
|
||||
self.id = id
|
||||
|
||||
arguments = text.split(' ')
|
||||
counter = 0
|
||||
|
Loading…
Reference in New Issue
Block a user