summaryrefslogtreecommitdiff
path: root/tests/functional/ext/docparams/return/missing_return_doc_required_Sphinx.py
blob: 61be7696e72aa471901f393b46c6834855668164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""Tests for missing-return-doc and missing-return-type-doc for Sphinx style docstrings
with accept-no-returns-doc = no"""
# pylint: disable=function-redefined, invalid-name, undefined-variable, missing-function-docstring
# pylint: disable=unused-argument


def my_func(self):  # [missing-return-type-doc]
    """Warn partial sphinx returns

    :returns: Always False
    """
    return False


def my_func(self) -> bool:
    """Sphinx missing return type with annotations

    :returns: Always False
    """
    return False


def my_func(self):  # [missing-return-doc]
    """Warn partial sphinx returns type

    :rtype: bool
    """
    return False


def warn_missing_sphinx_returns(self, doc_type):  # [missing-return-type-doc, missing-return-doc]
    """This is a docstring.

    :param doc_type: Sphinx
    :type doc_type: str
    """
    return False


def my_func(self):  # [missing-return-doc]
    """warns_sphinx_return_list_of_custom_class_without_description

    :rtype: list(:class:`mymodule.Class`)
    """
    return [mymodule.Class()]