diff options
author | Joris | 2021-10-16 20:09:55 +0200 |
---|---|---|
committer | Joris | 2021-10-16 20:09:56 +0200 |
commit | a54b7776320ef5aa02e6ef7378c2a011dc454885 (patch) | |
tree | 0cc69107fc3db626ade1b91e70966f9ecff19678 /todo/model/priority.py | |
parent | 9d8b61da195bf8de14159f1222a693d62ceebacd (diff) | |
download | todo-a54b7776320ef5aa02e6ef7378c2a011dc454885.tar.gz todo-a54b7776320ef5aa02e6ef7378c2a011dc454885.tar.bz2 todo-a54b7776320ef5aa02e6ef7378c2a011dc454885.zip |
Introduce due date
Also:
- Remove duration, difficulty and priority,
- Translate to french.
Diffstat (limited to 'todo/model/priority.py')
-rw-r--r-- | todo/model/priority.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/todo/model/priority.py b/todo/model/priority.py deleted file mode 100644 index 5948104..0000000 --- a/todo/model/priority.py +++ /dev/null @@ -1,30 +0,0 @@ -from enum import IntEnum -from typing import Optional - -class Priority(IntEnum): - LOW = 0 - MIDDLE = 1 - HIGH = 2 - -values = [ - Priority.LOW, - Priority.MIDDLE, - Priority.HIGH] - -def format(priority: Priority) -> str: - if priority == Priority.LOW: - return "Low" - elif priority == Priority.MIDDLE: - return "Middle" - elif priority == Priority.HIGH: - return "High" - -def parse(string: str) -> Optional[Priority]: - if string == "Low": - return Priority.LOW - elif string == "Middle": - return Priority.MIDDLE - elif string == "High": - return Priority.HIGH - else: - return None |