FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 2afafd2e authored by Silas S. Brown's avatar Silas S. Brown
Browse files

Gradint update

git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/gradint@1080 29193198-4895-4776-b068-10539e920549
parent b5d5fba4
No related branches found
Tags v0.99691
No related merge requests found
......@@ -91,11 +91,12 @@ for l in sys.stdin.xreadlines():
for i in range(len(l)):
if not l[i]==" ":
indentLevel = i ; break
was_inTripleQuotes = inTripleQuotes
if (len(l.split('"""'))%2) == 0: inTripleQuotes = not inTripleQuotes
if indentLevel<0 or indentLevel==len(l) or (revertToIndent>=0 and (indentLevel>revertToIndent or inTripleQuotes)): continue
if indentLevel<0 or indentLevel==len(l) or (revertToIndent>=0 and (indentLevel>revertToIndent or was_inTripleQuotes)): continue
revertToIndent = -1
code = (l+"#")[:l.find("#")].strip()
if code in to_omit: # TODO and not inTripleQuotes?
if code in to_omit and not was_inTripleQuotes:
print " "*indentLevel+code+" pass # trimmed"
revertToIndent = indentLevel
omitted[code]=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment