Skip to content

Commit 583f7ff

Browse files
authored
Added missing-return-type-doc message example (#6343)
1 parent b5d64d3 commit 583f7ff

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def integer_sum(a: int, b: int): # [missing-return-type-doc]
2+
"""Returns sum of two integers
3+
:param a: first integer
4+
:param b: second integer
5+
:return: sum of parameters a and b
6+
"""
7+
return a + b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This message is raised only when parameter ``accept-no-return-doc`` is set to ``no``.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def integer_sum(a: int, b: int) -> int:
2+
"""Returns sum of two integers
3+
:param a: first integer
4+
:param b: second integer
5+
:return: sum of parameters a and b
6+
"""
7+
return a + b
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[master]
2+
load-plugins=pylint.extensions.docparams
3+
4+
[Parameter_documentation]
5+
accept-no-return-doc=no

0 commit comments

Comments
 (0)