summaryrefslogtreecommitdiff
path: root/sqlparse/sql.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2014-03-30 14:24:33 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2015-01-17 09:24:35 +0100
commite51fbdff1d111a39dd78bb5e6b1ab1d8f599e51b (patch)
tree64e6faec1213ed50e2c3b70dd15ade3eec4f1fe1 /sqlparse/sql.py
parentd3ed00f4ee3dcd7ae12b091e5590ab49f715d96e (diff)
downloadsqlparse-e51fbdff1d111a39dd78bb5e6b1ab1d8f599e51b.tar.gz
Add flake8 to tox configuration and code cleanup.
Diffstat (limited to 'sqlparse/sql.py')
-rw-r--r--sqlparse/sql.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/sqlparse/sql.py b/sqlparse/sql.py
index 6174db0..0fe92c7 100644
--- a/sqlparse/sql.py
+++ b/sqlparse/sql.py
@@ -220,18 +220,10 @@ class TokenList(Token):
else:
yield token
-# def __iter__(self):
-# return self
-#
-# def next(self):
-# for token in self.tokens:
-# yield token
-
def is_group(self):
return True
def get_sublists(self):
-# return [x for x in self.tokens if isinstance(x, TokenList)]
for x in self.tokens:
if isinstance(x, TokenList):
yield x
@@ -629,10 +621,9 @@ class Function(TokenList):
for t in parenthesis.tokens:
if isinstance(t, IdentifierList):
return t.get_identifiers()
- elif isinstance(t, Identifier) or \
- isinstance(t, Function) or \
- t.ttype in T.Literal:
- return [t,]
+ elif (isinstance(t, (Identifier, Function))
+ or t.ttype in T.Literal):
+ return [t]
return []