--- 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: