src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py

branch
eric7
changeset 9453
e5065dde905d
parent 9422
cf2ea9c6316a
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9452:325c6de4b1f5 9453:e5065dde905d
214 docstringList[0] = self.__quote3 + docstringList[0] 214 docstringList[0] = self.__quote3 + docstringList[0]
215 newCursorLine = insertLine 215 newCursorLine = insertLine
216 docstringList.append(self.__quote3) 216 docstringList.append(self.__quote3)
217 for index, line in enumerate(docstringList): 217 for index, line in enumerate(docstringList):
218 docstringList[index] = ( 218 docstringList[index] = (
219 indentation + line 219 indentation + line if bool(line.strip()) else ""
220 if bool(line.strip())
221 else ""
222 ) 220 )
223 return sep.join(docstringList) + sep, (insertLine, 0), newCursorLine 221 return sep.join(docstringList) + sep, (insertLine, 0), newCursorLine
224 222
225 return "", (0, 0), 0 223 return "", (0, 0), 0
226 224
322 docstringList[0] = self.__quote3 + docstringList[0] 320 docstringList[0] = self.__quote3 + docstringList[0]
323 newCursorLine = cursorPosition[0] 321 newCursorLine = cursorPosition[0]
324 docstringList.append(self.__quote3) 322 docstringList.append(self.__quote3)
325 for index, line in enumerate(docstringList): 323 for index, line in enumerate(docstringList):
326 docstringList[index] = ( 324 docstringList[index] = (
327 indentation + line 325 indentation + line if bool(line.strip()) else ""
328 if bool(line.strip())
329 else ""
330 ) 326 )
331 docstring = sep.join(docstringList) + indentation 327 docstring = sep.join(docstringList) + indentation
332 return docstring, cursorPosition, newCursorLine 328 return docstring, cursorPosition, newCursorLine
333 329
334 return "", (0, 0), 0 330 return "", (0, 0), 0

eric ide

mercurial