def prepend_status(func):
    """Prepends the output of `func` with the status."""

    @ft.wraps(func)
    def wrapper(self, *args, **kwargs):
        """Wrapper stub."""
        res = func(self, *args, **kwargs)
        if self.status is not StepResult.UNSET:
            res = "[{status}]".format(status=self.status.name) + res
        return res

    return wrapper
def prepend_status ( func ) : @ ft . wraps ( func ) def wrapper ( self , * args , ** kwargs ) : res = func ( self , * args , ** kwargs ) if self . status is not StepResult . UNSET : res = "[{status}]" . format ( status = self . status . name ) + res return res return wrapper
Prepends the output of `func` with the status.