@@ -232,7 +232,6 @@ def is_group(self):
232232 return True
233233
234234 def get_sublists (self ):
235- # return [x for x in self.tokens if isinstance(x, TokenList)]
236235 for x in self .tokens :
237236 if isinstance (x , TokenList ):
238237 yield x
@@ -347,9 +346,9 @@ def token_next(self, idx, skip_ws=True):
347346 def token_index (self , token , start = 0 ):
348347 """Return list index of token."""
349348 if start > 0 :
350- # Performing `index` manually is much faster when starting in the middle
351- # of the list of tokens and expecting to find the token near to the starting
352- # index.
349+ # Performing `index` manually is much faster when starting
350+ # in the middle of the list of tokens and expecting to find
351+ # the token near to the starting index.
353352 for i in range (start , len (self .tokens )):
354353 if self .tokens [i ] == token :
355354 return i
@@ -471,6 +470,7 @@ def _get_first_name(self, idx=None, reverse=False, keywords=False):
471470 return tok .get_name ()
472471 return None
473472
473+
474474class Statement (TokenList ):
475475 """Represents a SQL statement."""
476476
@@ -570,6 +570,7 @@ class SquareBrackets(TokenList):
570570 def _groupable_tokens (self ):
571571 return self .tokens [1 :- 1 ]
572572
573+
573574class Assignment (TokenList ):
574575 """An assignment like 'var := val;'"""
575576 __slots__ = ('value' , 'ttype' , 'tokens' )
@@ -672,10 +673,10 @@ def get_parameters(self):
672673 for t in parenthesis .tokens :
673674 if isinstance (t , IdentifierList ):
674675 return t .get_identifiers ()
675- elif isinstance (t , Identifier ) or \
676- isinstance (t , Function ) or \
677- t .ttype in T .Literal :
678- return [t ,]
676+ elif ( isinstance (t , Identifier ) or
677+ isinstance (t , Function ) or
678+ t .ttype in T .Literal ) :
679+ return [t , ]
679680 return []
680681
681682
0 commit comments