@@ -25,7 +25,7 @@ def __init__(self, case=None):
2525 assert case in ['lower' , 'upper' , 'capitalize' ]
2626 self .convert = getattr (text_type , case )
2727
28- def process (self , stack , stream ):
28+ def process (self , stream ):
2929 for ttype , value in stream :
3030 if ttype in self .ttype :
3131 value = self .convert (value )
@@ -39,7 +39,7 @@ class KeywordCaseFilter(_CaseFilter):
3939class IdentifierCaseFilter (_CaseFilter ):
4040 ttype = (T .Name , T .String .Symbol )
4141
42- def process (self , stack , stream ):
42+ def process (self , stream ):
4343 for ttype , value in stream :
4444 if ttype in self .ttype and not value .strip ()[0 ] == '"' :
4545 value = self .convert (value )
@@ -52,7 +52,7 @@ def __init__(self, width, char):
5252 self .width = max (width , 1 )
5353 self .char = u (char )
5454
55- def process (self , stack , stream ):
55+ def process (self , stream ):
5656 for ttype , value in stream :
5757 if ttype is T .Literal .String .Single :
5858 if value [:2 ] == '\' \' ' :
@@ -94,8 +94,8 @@ def _process(self, tlist):
9494 tlist .tokens .pop (tidx )
9595 token = self ._get_next_comment (tlist )
9696
97- def process (self , stack , stmt ):
98- [self .process (stack , sgroup ) for sgroup in stmt .get_sublists ()]
97+ def process (self , stmt ):
98+ [self .process (sgroup ) for sgroup in stmt .get_sublists ()]
9999 self ._process (stmt )
100100
101101
@@ -139,8 +139,8 @@ def _stripws_parenthesis(self, tlist):
139139 tlist .tokens .pop (- 2 )
140140 self ._stripws_default (tlist )
141141
142- def process (self , stack , stmt , depth = 0 ):
143- [self .process (stack , sgroup , depth + 1 )
142+ def process (self , stmt , depth = 0 ):
143+ [self .process (sgroup , depth + 1 )
144144 for sgroup in stmt .get_sublists ()]
145145 self ._stripws (stmt )
146146 if (
@@ -334,7 +334,7 @@ def _process_default(self, tlist, stmts=True, kwds=True):
334334 self ._split_kwds (tlist )
335335 [self ._process (sgroup ) for sgroup in tlist .get_sublists ()]
336336
337- def process (self , stack , stmt ):
337+ def process (self , stmt ):
338338 if isinstance (stmt , sql .Statement ):
339339 self ._curr_stmt = stmt
340340 self ._process (stmt )
@@ -350,7 +350,7 @@ def process(self, stack, stmt):
350350 self ._last_stmt = stmt
351351
352352
353- # FIXME: Doesn't work ;)
353+ # FIXME: Doesn't work
354354class RightMarginFilter (object ):
355355
356356 keep_together = (
@@ -361,7 +361,7 @@ def __init__(self, width=79):
361361 self .width = width
362362 self .line = ''
363363
364- def _process (self , stack , group , stream ):
364+ def _process (self , group , stream ):
365365 for token in stream :
366366 if token .is_whitespace () and '\n ' in token .value :
367367 if token .value .endswith ('\n ' ):
@@ -370,7 +370,7 @@ def _process(self, stack, group, stream):
370370 self .line = token .value .splitlines ()[- 1 ]
371371 elif (token .is_group ()
372372 and token .__class__ not in self .keep_together ):
373- token .tokens = self ._process (stack , token , token .tokens )
373+ token .tokens = self ._process (token , token .tokens )
374374 else :
375375 val = u (token )
376376 if len (self .line ) + len (val ) > self .width :
@@ -384,17 +384,17 @@ def _process(self, stack, group, stream):
384384 self .line += val
385385 yield token
386386
387- def process (self , stack , group ):
388- return
389- group .tokens = self ._process (stack , group , group .tokens )
390-
387+ def process (self , group ):
388+ # return
389+ # group.tokens = self._process(group, group.tokens)
390+ raise NotImplementedError
391391
392392# ---------------------------
393393# postprocess
394394
395395class SerializerUnicode (object ):
396396
397- def process (self , stack , stmt ):
397+ def process (self , stmt ):
398398 raw = u (stmt )
399399 lines = split_unquoted_newlines (raw )
400400 res = '\n ' .join (line .rstrip () for line in lines )
@@ -411,7 +411,7 @@ def __init__(self, varname='sql'):
411411 def _process (self , stream , varname , has_nl ):
412412 raise NotImplementedError
413413
414- def process (self , stack , stmt ):
414+ def process (self , stmt ):
415415 self .count += 1
416416 if self .count > 1 :
417417 varname = '%s%d' % (self .varname , self .count )
0 commit comments