Project/CreateDialogCodeDialog.py

changeset 1132
f8275b31dbe5
parent 1131
7781e396c903
child 1137
1a37887aefa7
equal deleted inserted replaced
1131:7781e396c903 1132:f8275b31dbe5
353 # delete empty lines at end 353 # delete empty lines at end
354 while not sourceImpl[-1].strip(): 354 while not sourceImpl[-1].strip():
355 del sourceImpl[-1] 355 del sourceImpl[-1]
356 else: 356 else:
357 appendAtIndex = cls.endlineno - 1 357 appendAtIndex = cls.endlineno - 1
358 while not sourceImpl[appendAtIndex].strip():
359 appendAtIndex -= 1
360 appendAtIndex += 1
358 361
359 # determine indent string 362 # determine indent string
360 for line in sourceImpl[cls.lineno:cls.endlineno + 1]: 363 for line in sourceImpl[cls.lineno:cls.endlineno + 1]:
361 if line.lstrip().startswith("def __init__"): 364 if line.lstrip().startswith("def __init__"):
362 indentStr = line.replace(line.lstrip(), "") 365 indentStr = line.replace(line.lstrip(), "")

eric ide

mercurial