Task¶
-
class
igclib.core.task.Task(task)[source]¶ Creates a Task object. The way this is done is really bad, and any help would be appreciated. As of now, this class checks if the input task (file or b64) “fits” in each parser implemented. When a parser does not raise a KeyError, the task is assumed to be of this format and its attributes are copied back to the Task object. I feel that there is a smarter way to do this, probably with inheritance. However, task format is not known in advance so trying each format seems like the easiest thing to do.
Parameters: task (str) – Path to or base64 representation of a task file. Raises: NotImplementedError– If the task could not be parsed.