541 @rtype int |
541 @rtype int |
542 """ |
542 """ |
543 # start with zero based line after start line |
543 # start with zero based line after start line |
544 while lineno < len(lines): |
544 while lineno < len(lines): |
545 line = lines[lineno] |
545 line = lines[lineno] |
546 if line.strip(): |
546 if line.strip() and not line.lstrip().startswith("#"): |
547 # line contains some text |
547 # line contains some text and does not start with |
|
548 # a comment sign |
548 lineIndent = _indent(line.replace(line.lstrip(), "")) |
549 lineIndent = _indent(line.replace(line.lstrip(), "")) |
549 if lineIndent <= indent: |
550 if lineIndent <= indent: |
550 return lineno |
551 return lineno |
551 lineno += 1 |
552 lineno += 1 |
552 |
553 |