--- a/eric6/E5XML/TasksReader.py Sat May 01 14:27:38 2021 +0200 +++ b/eric6/E5XML/TasksReader.py Thu Jun 03 11:39:23 2021 +0200 @@ -15,7 +15,7 @@ from .Config import tasksFileFormatVersion from .XMLStreamReaderBase import XMLStreamReaderBase -from Tasks.Task import Task +from Tasks.Task import TaskType, TaskPriority import Utilities @@ -80,25 +80,27 @@ Private method to read the task info. """ task = {"summary": "", - "priority": 1, + "priority": TaskPriority.NORMAL, "completed": False, "created": 0, "filename": "", "linenumber": 0, - "type": Task.TypeTodo, + "type": TaskType.TODO, "description": "", "uid": "", } - task["priority"] = int(self.attribute("priority", "1")) + task["priority"] = TaskPriority( + int(self.attribute("priority", str(TaskPriority.NORMAL.value))) + ) task["completed"] = self.toBool(self.attribute("completed", "False")) if self.version in ["4.2", "5.0"]: isBugfix = self.toBool(self.attribute("bugfix", "False")) if isBugfix: - task["type"] = Task.TypeFixme + task["type"] = TaskType.FIXME else: - # TODO: task type enum change - # TaskType(int(self.attribute("type", str(Task.TypeTodo.value)))) - task["type"] = int(self.attribute("type", str(Task.TypeTodo))) + task["type"] = TaskType( + int(self.attribute("type", str(TaskType.TODO.value))) + ) uid = self.attribute("uid", "") if uid: task["uid"] = uid