diff --git a/doc/data/messages/m/missing-return-type-doc/bad.py b/doc/data/messages/m/missing-return-type-doc/bad.py new file mode 100644 index 0000000000..d2d9502dae --- /dev/null +++ b/doc/data/messages/m/missing-return-type-doc/bad.py @@ -0,0 +1,7 @@ +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 diff --git a/doc/data/messages/m/missing-return-type-doc/details.rst b/doc/data/messages/m/missing-return-type-doc/details.rst new file mode 100644 index 0000000000..65fd356421 --- /dev/null +++ b/doc/data/messages/m/missing-return-type-doc/details.rst @@ -0,0 +1 @@ +This message is raised only when parameter ``accept-no-return-doc`` is set to ``no``. diff --git a/doc/data/messages/m/missing-return-type-doc/good.py b/doc/data/messages/m/missing-return-type-doc/good.py new file mode 100644 index 0000000000..28dd62a2b3 --- /dev/null +++ b/doc/data/messages/m/missing-return-type-doc/good.py @@ -0,0 +1,7 @@ +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 diff --git a/doc/data/messages/m/missing-return-type-doc/pylintrc b/doc/data/messages/m/missing-return-type-doc/pylintrc new file mode 100644 index 0000000000..3928037cb9 --- /dev/null +++ b/doc/data/messages/m/missing-return-type-doc/pylintrc @@ -0,0 +1,5 @@ +[master] +load-plugins=pylint.extensions.docparams + +[Parameter_documentation] +accept-no-return-doc=no