src/eric7/QScintilla/DocstringGenerator/PyDocstringGenerator.py

branch
eric7
changeset 10057
1e31ca1078ab
parent 9653
e67609152c5e
child 10078
9ebe2183cf49
equal deleted inserted replaced
10056:ac1c214e0a05 10057:1e31ca1078ab
338 @type tuple of (int, int) 338 @type tuple of (int, int)
339 @return text containing the function definition 339 @return text containing the function definition
340 @rtype str 340 @rtype str
341 """ 341 """
342 startLine = cursorPosition[0] - 1 342 startLine = cursorPosition[0] - 1
343 endLine = startLine - min(startLine, 20) 343 endLine = startLine - min(startLine, 20) - 1
344 # max. 20 lines of definition allowed 344 # max. 20 lines of definition allowed
345 if endLine < -1:
346 endLine = -1
345 isFirstLine = True 347 isFirstLine = True
346 functionTextList = [] 348 functionTextList = []
347 349
348 for lineNo in range(startLine, endLine, -1): 350 for lineNo in range(startLine, endLine, -1):
349 text = self.editor.text(lineNo).rstrip() 351 text = self.editor.text(lineNo).rstrip()

eric ide

mercurial