homework_checker/core/tasks.py
def from_yaml_node(
        task_node: dict, student_hw_folder: Path, job_file: Path
    ) -> Optional[Task]:
        """Create an Task appropriate for the language."""
        student_task_folder = student_hw_folder / task_node[Tags.FOLDER_TAG]
        if not student_task_folder.exists():
            log.warning("Folder '%s' does not exist. Skipping.", student_task_folder)
            return None
        language_tag = task_node[Tags.LANGUAGE_TAG]
        if language_tag == LangTags.CPP:
            return CppTask(task_node, student_task_folder, job_file)
        if language_tag == LangTags.BASH:
            return BashTask(task_node, student_task_folder, job_file)
        log.error("Unknown Task language.")
        return None
Create an Task appropriate for the language.
Create an Task appropriate for the language.
Create an Task appropriate for the language .
def from_yaml_node(
        task_node: dict, student_hw_folder: Path, job_file: Path
    ) -> Optional[Task]:
        student_task_folder = student_hw_folder / task_node[Tags.FOLDER_TAG]
        if not student_task_folder.exists():
            log.warning("Folder '%s' does not exist. Skipping.", student_task_folder)
            return None
        language_tag = task_node[Tags.LANGUAGE_TAG]
        if language_tag == LangTags.CPP:
            return CppTask(task_node, student_task_folder, job_file)
        if language_tag == LangTags.BASH:
            return BashTask(task_node, student_task_folder, job_file)
        log.error("Unknown Task language.")
        return None
def from_yaml_node ( task_node : dict , student_hw_folder : Path , job_file : Path ) -> Optional [ Task ] : student_task_folder = student_hw_folder / task_node [ Tags . FOLDER_TAG ] if not student_task_folder . exists ( ) : log . warning ( "Folder '%s' does not exist. Skipping." , student_task_folder ) return None language_tag = task_node [ Tags . LANGUAGE_TAG ] if language_tag == LangTags . CPP : return CppTask ( task_node , student_task_folder , job_file ) if language_tag == LangTags . BASH : return BashTask ( task_node , student_task_folder , job_file ) log . error ( "Unknown Task language." ) return None
Create an Task appropriate for the language.
Create an Task appropriate for the language .
"""Create an Task appropriate for the language."""
task_node
dict
student_hw_folder
Path
job_file
Path