Source code for inginious.common.task_file_readers.yaml_reader

# -*- coding: utf-8 -*-
# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for
# more information about the licensing of this file.

""" YAML task file manager """

import inginious.common.custom_yaml
from inginious.common.task_file_readers.abstract_reader import AbstractTaskFileReader

[docs]class TaskYAMLFileReader(AbstractTaskFileReader): """ Read and write task descriptions in YAML """
[docs] def load(self, content): return inginious.common.custom_yaml.load(content)
[docs] @classmethod def get_ext(cls): return "yaml"
[docs] def dump(self, data): return inginious.common.custom_yaml.dump(data)