allow id to be assigned at init

This commit is contained in:
Akbar Rahman 2021-03-19 14:23:37 +00:00
parent 62726ad687
commit 813e75c74a
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -3,7 +3,7 @@
from distutils.core import setup
setup(name="pydo.txt",
version="1.1",
version="1.2",
description="A module to parse todo.txt tasks",
author="Alvie Rahman",
url="https://github.com/alvierahman90/pydo.txt",