aboutsummaryrefslogtreecommitdiff
path: root/todo/model/difficulty.py
diff options
context:
space:
mode:
Diffstat (limited to 'todo/model/difficulty.py')
-rw-r--r--todo/model/difficulty.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/todo/model/difficulty.py b/todo/model/difficulty.py
deleted file mode 100644
index 526cdb9..0000000
--- a/todo/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