summaryrefslogtreecommitdiff
path: root/sqlparse/engine/grouping.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2011-09-06 08:01:12 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2011-09-06 08:01:12 +0200
commitbcaf3269b3a8746a4ee8c848256d5f2b11b25d27 (patch)
tree942dc34e3e993bdcce71e0295c146fd556efbba5 /sqlparse/engine/grouping.py
parent3bf54c10f0742e3afc75dcaa4623397097beadc5 (diff)
downloadsqlparse-bcaf3269b3a8746a4ee8c848256d5f2b11b25d27.tar.gz
Code cleanup.
Diffstat (limited to 'sqlparse/engine/grouping.py')
-rw-r--r--sqlparse/engine/grouping.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index 9bc9612..72f919b 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -267,13 +267,15 @@ def group_aliased(tlist):
token = tlist.token_next_by_instance(idx, (sql.Identifier, sql.Function))
while token:
next_ = tlist.token_next(tlist.token_index(token))
- if next_ is not None and isinstance(next_, (sql.Identifier, sql.Function)):
+ if next_ is not None and isinstance(next_,
+ (sql.Identifier, sql.Function)):
grp = tlist.tokens_between(token, next_)[1:]
token.tokens.extend(grp)
for t in grp:
tlist.tokens.remove(t)
idx = tlist.token_index(token) + 1
- token = tlist.token_next_by_instance(idx, (sql.Identifier, sql.Function))
+ token = tlist.token_next_by_instance(idx,
+ (sql.Identifier, sql.Function))
def group_typecasts(tlist):