@@ 53,6 53,7 @@ class Template:
self.add_line("return output")
self.dedent()
+ assert not self.buffer
assert self.INDENT == 0
def do_dots(self, token):
@@ 85,7 86,7 @@ class Template:
return data
def parse_loop(self, tokens):
- for count, token in enumerate(tokens):
+ for token in tokens:
if token in ("{%", "%}"):
pass
elif token == "for":
@@ 98,7 99,7 @@ class Template:
self.buffer.append(token)
def parse_conditionals(self, tokens):
- for count, token in enumerate(tokens):
+ for token in tokens:
if token in ("{%", "%}"):
pass
elif iskeyword(token) and token in ("if", "in"):