@@ -231,7 +231,8 @@ def tokenizeTemplate(templateText):
231
231
if kind in ('literal' , 'symbol' ):
232
232
if len (savedLiteral ) == 0 :
233
233
literalFirstMatch = m
234
- savedLiteral .append (text ) # literals and symbols get batched together
234
+ # literals and symbols get batched together
235
+ savedLiteral .append (text )
235
236
pos = None
236
237
else :
237
238
# found a non-literal. First yield any literal we've accumulated
@@ -248,7 +249,8 @@ def tokenizeTemplate(templateText):
248
249
if pos is None :
249
250
pos = m .end (0 )
250
251
else :
251
- yield # Client is not yet ready to process next token
252
+ # Client is not yet ready to process next token
253
+ yield
252
254
253
255
if savedLiteral != []:
254
256
yield 'literal' , '' .join (savedLiteral ), literalFirstMatch
@@ -328,7 +330,8 @@ def splitGybLines(sourceLines):
328
330
lastTokenText , lastTokenKind = tokenText , tokenKind
329
331
330
332
except tokenize .TokenError :
331
- return [] # Let the later compile() call report the error
333
+ # Let the later compile() call report the error
334
+ return []
332
335
333
336
if lastTokenText == ':' :
334
337
unmatchedIndents .append (len (sourceLines ))
@@ -459,7 +462,8 @@ def tokenGenerator(self, baseTokens):
459
462
# Do we need to close the current lines?
460
463
self .closeLines = kind == 'gybLinesClose'
461
464
462
- if kind .endswith ('Open' ): # %{...}% and ${...} constructs
465
+ # %{...}% and ${...} constructs
466
+ if kind .endswith ('Open' ):
463
467
464
468
# Tokenize text that follows as Python up to an unmatched '}'
465
469
codeStart = self .tokenMatch .end (kind )
@@ -478,7 +482,8 @@ def tokenGenerator(self, baseTokens):
478
482
nextPos = m2 .end (0 )
479
483
else :
480
484
assert kind == 'substitutionOpen'
481
- nextPos = closePos + 1 # skip past the closing '}'
485
+ # skip past the closing '}'
486
+ nextPos = closePos + 1
482
487
483
488
# Resume tokenizing after the end of the code.
484
489
baseTokens .send (nextPos )
0 commit comments