eric6/QScintilla/DocstringGenerator/SphinxdocGenerator.py

changeset 8005
94a6a1bd5f80
parent 8000
47b15df088e4
equal deleted inserted replaced
8004:38d359e2ded7 8005:94a6a1bd5f80
65 if functionInfo.raiseList: 65 if functionInfo.raiseList:
66 for exc in sorted(functionInfo.raiseList): 66 for exc in sorted(functionInfo.raiseList):
67 lines.append(":raises {0}: DESCRIPTION".format(exc)) 67 lines.append(":raises {0}: DESCRIPTION".format(exc))
68 68
69 # add return section 69 # add return section
70 if functionInfo.hasYield or functionInfo.returnValueInBody: 70 if (
71 functionInfo.hasYield or
72 functionInfo.returnValueInBody or
73 functionInfo.returnTypeAnnotated
74 ):
71 if functionInfo.hasYield: 75 if functionInfo.hasYield:
72 lines.append(":yield: DESCRIPTION") 76 lines.append(":yield: DESCRIPTION")
73 else: 77 else:
74 lines.append(":return: DESCRIPTION") 78 lines.append(":return: DESCRIPTION")
75 if functionInfo.returnTypeAnnotated: 79 if functionInfo.returnTypeAnnotated:

eric ide

mercurial