#137 all directives must document their return values
Closed: Fixed Opened by kparal.

Currently, some of our directives don't say what they return (or whether they return something at all). This is important to know so that task authors can properly use the export: command.

Please go through all our directives and document their return value in their docstring. Please make sure the docstring is attached to the class itself, rather than the process() method (it's easier to find it at the class level).

Example for the createrepo_directive.py:

    def process(self, input_data, env_data):
        """For the createrepo directive, we're expecting a yaml declaration of
        the form ``createrepo: repodir=/path/to/some/dir``
        """

would become:

class CreaterepoDirective(BaseDirective):
    """For the createrepo directive, we're expecting a yaml declaration of
    the form ``createrepo: repodir=/path/to/some/dir``
    :return: standard output of ``createrepo`` command
    :rtype: str
    """

If there is a directive that returns a cumbersome object for no apparent reason (maybe koji_directive.py), propose an improvement. If there is a directive that returns complex data when we don't actually need them (maybe resultsdb_directive.py, but check whether we don't need them), just return nothing instead.


This ticket had assigned some Differential requests:
D93

This got fixed in D93.

Metadata Update from @kparal:
- Issue tagged with: easyfix

Metadata