diff options
author | Joris | 2020-06-06 17:44:26 +0200 |
---|---|---|
committer | Joris | 2020-06-06 19:54:03 +0200 |
commit | 1595e0de940a86a7810df0e02e43838d97c0d846 (patch) | |
tree | 9701eeec0d98baa9f6044b1911df68e4c8539819 /src/model | |
parent | 6b9195000eb5404c247288b384d7ca2bacc1ab23 (diff) |
Provide nix build
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/difficulty.py | 30 | ||||
-rw-r--r-- | src/model/priority.py | 30 | ||||
-rw-r--r-- | src/model/status.py | 30 | ||||
-rw-r--r-- | src/model/tag.py | 12 | ||||
-rw-r--r-- | src/model/task.py | 22 | ||||
-rw-r--r-- | src/model/task_tag.py | 5 |
6 files changed, 0 insertions, 129 deletions
diff --git a/src/model/difficulty.py b/src/model/difficulty.py deleted file mode 100644 index 526cdb9..0000000 --- a/src/model/difficulty.py +++ /dev/null @@ -1,30 +0,0 @@ -from enum import IntEnum -from typing import Optional - -class Difficulty(IntEnum): - EASY = 0 - NORMAL = 1 - HARD = 2 - -values = [ - Difficulty.EASY, - Difficulty.NORMAL, - Difficulty.HARD] - -def format(difficulty: Difficulty) -> str: - if difficulty == Difficulty.EASY: - return "Easy" - elif difficulty == Difficulty.NORMAL: - return "Normal" - elif difficulty == Difficulty.HARD: - return "Hard" - -def parse(string: str) -> Optional[Difficulty]: - if string == "Easy": - return Difficulty.EASY - elif string == "Normal": - return Difficulty.NORMAL - elif string == "Hard": - return Difficulty.HARD - else: - return None diff --git a/src/model/priority.py b/src/model/priority.py deleted file mode 100644 index 5948104..0000000 --- a/src/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 diff --git a/src/model/status.py b/src/model/status.py deleted file mode 100644 index 6881e0a..0000000 --- a/src/model/status.py +++ /dev/null @@ -1,30 +0,0 @@ -from enum import IntEnum -from typing import Optional - -class Status(IntEnum): - READY = 0 - WAITING = 1 - MAYBE = 2 - -values = [ - Status.READY, - Status.WAITING, - Status.MAYBE] - -def format(status: Status) -> str: - if status == Status.READY: - return "Ready" - elif status == Status.WAITING: - return "Waiting" - elif status == Status.MAYBE: - return "Maybe" - -def parse(string: str) -> Optional[Status]: - if string == "Ready": - return Status.READY - elif string == "Waiting": - return Status.WAITING - elif string == "Maybe": - return Status.MAYBE - else: - return None diff --git a/src/model/tag.py b/src/model/tag.py deleted file mode 100644 index 030b223..0000000 --- a/src/model/tag.py +++ /dev/null @@ -1,12 +0,0 @@ -from typing import NamedTuple - -class Tag(NamedTuple): - id: int - created_at: int - updated_at: int - name: str - color: str - -class ValidTagForm(NamedTuple): - name: str - color: str diff --git a/src/model/task.py b/src/model/task.py deleted file mode 100644 index 69f9807..0000000 --- a/src/model/task.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import NamedTuple, List - -from model.difficulty import Difficulty -from model.priority import Priority - -class Task(NamedTuple): - id: int - created_at: int - updated_at: int - name: str - duration: int - difficulty: Difficulty - priority: Priority - description: str - -class ValidTaskForm(NamedTuple): - name: str - duration: int - difficulty: Difficulty - priority: Priority - tags: List[int] - description: str diff --git a/src/model/task_tag.py b/src/model/task_tag.py deleted file mode 100644 index 0a33c66..0000000 --- a/src/model/task_tag.py +++ /dev/null @@ -1,5 +0,0 @@ -from typing import NamedTuple - -class TaskTag(NamedTuple): - task_id: int - tag_id: int |