def __init__(self, repo, inputs):
        """Build a custom message."""
        msg = 'There are not any detected outputs in the repository.'

        from renku.models.cwl.types import File
        paths = [
            os.path.relpath(str(input_.default.path))  # relative to cur path
            for input_ in inputs  # only choose files
            if isinstance(input_.default, File)
        ]

        if paths:
            msg += (
                '\n  (use "git rm <file>..." to remove them first)'
                '\n\n' + '\n'.join(
                    '\t' + click.style(path, fg='yellow') for path in paths
                ) + '\n\n'
                'Once you have removed files that should be used as outputs,\n'
                'you can safely rerun the previous command.'
            )
        else:
            msg += (
                '\n\nIf you want to track the command anyway use '
                '--no-output option.'
            )

        super(OutputsNotFound, self).__init__(msg)
def __init__ ( self , repo , inputs ) : msg = 'There are not any detected outputs in the repository.' from renku . models . cwl . types import File paths = [ os . path . relpath ( str ( input_ . default . path ) ) for input_ in inputs if isinstance ( input_ . default , File ) ] if paths : msg += ( '\n  (use "git rm <file>..." to remove them first)' '\n\n' + '\n' . join ( '\t' + click . style ( path , fg = 'yellow' ) for path in paths ) + '\n\n' 'Once you have removed files that should be used as outputs,\n' 'you can safely rerun the previous command.' ) else : msg += ( '\n\nIf you want to track the command anyway use ' '--no-output option.' ) super ( OutputsNotFound , self ) . __init__ ( msg )
Build a custom message.