homework_checker/core/md_writer.py
def _add_error(
        self: "MdWriter",
        hw_name: str,
        task_name: str,
        test_name: str,
        test_result: CmdResult,
        expired: bool,
    ):
        """Add a section of errors to the md file."""
        if test_result.succeeded():
            return
        if expired:
            self._errors += EXPIRED_TEMPLATE.format(hw_name=hw_name)
            return
        self._errors += ERROR_TEMPLATE.format(
            hw_name=hw_name,
            task_name=task_name,
            test_name=test_name,
            stderr=test_result.stderr,
            stdout=test_result.stdout,
        )
Add a section of errors to the md file.
Add a section of errors to the md file.
Add a section of errors to the md file .
def _add_error(
        self: "MdWriter",
        hw_name: str,
        task_name: str,
        test_name: str,
        test_result: CmdResult,
        expired: bool,
    ):
        if test_result.succeeded():
            return
        if expired:
            self._errors += EXPIRED_TEMPLATE.format(hw_name=hw_name)
            return
        self._errors += ERROR_TEMPLATE.format(
            hw_name=hw_name,
            task_name=task_name,
            test_name=test_name,
            stderr=test_result.stderr,
            stdout=test_result.stdout,
        )
def _add_error ( self : "MdWriter" , hw_name : str , task_name : str , test_name : str , test_result : CmdResult , expired : bool , ) : if test_result . succeeded ( ) : return if expired : self . _errors += EXPIRED_TEMPLATE . format ( hw_name = hw_name ) return self . _errors += ERROR_TEMPLATE . format ( hw_name = hw_name , task_name = task_name , test_name = test_name , stderr = test_result . stderr , stdout = test_result . stdout , )
Add a section of errors to the md file.
Add a section of errors to the md file .
"""Add a section of errors to the md file."""
self
"MdWriter"
hw_name
str
task_name
str
test_name
str
test_result
CmdResult
expired
bool