eric6/QScintilla/DocstringGenerator/SphinxdocGenerator.py

changeset 8005
94a6a1bd5f80
parent 8000
47b15df088e4
--- a/eric6/QScintilla/DocstringGenerator/SphinxdocGenerator.py	Mon Jan 25 14:44:35 2021 +0100
+++ b/eric6/QScintilla/DocstringGenerator/SphinxdocGenerator.py	Mon Jan 25 14:53:56 2021 +0100
@@ -67,7 +67,11 @@
             lines.append(":raises {0}: DESCRIPTION".format(exc))
     
     # add return section
-    if functionInfo.hasYield or functionInfo.returnValueInBody:
+    if (
+        functionInfo.hasYield or
+        functionInfo.returnValueInBody or
+        functionInfo.returnTypeAnnotated
+    ):
         if functionInfo.hasYield:
             lines.append(":yield: DESCRIPTION")
         else:

eric ide

mercurial