missing-return-type-doc / W9012#

Message emitted:

Missing return type documentation

Description:

Please document the type returned by this method.

Problematic code:

def integer_sum(a: int, b: int):  # [missing-return-type-doc]
    """Returns sum of two integers
    :param a: first integer
    :param b: second integer
    :return: sum of parameters a and b
    """
    return a + b

Correct code:

def integer_sum(a: int, b: int) -> int:
    """Returns sum of two integers
    :param a: first integer
    :param b: second integer
    :return: sum of parameters a and b
    """
    return a + b

Additional details:

This message is raised only when parameter accept-no-return-doc is set to no.

Note

This message is emitted by the optional 'parameter_documentation' checker which requires the pylint.extensions.docparams plugin to be loaded.

Created by the parameter_documentation checker.