diff options
author | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-16 06:45:09 -0700 |
---|---|---|
committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-18 18:01:40 -0700 |
commit | 581912d36e2b10191e46fa891dce912693983c95 (patch) | |
tree | cd09976baec1a96b1efcf1804219cfe40c995114 /sqlparse/engine | |
parent | 92b5f2bb88ed1c1080ecf7eb7449f5c642ae196a (diff) | |
download | sqlparse-581912d36e2b10191e46fa891dce912693983c95.tar.gz |
Misc. small code clean-up/comments
Diffstat (limited to 'sqlparse/engine')
-rw-r--r-- | sqlparse/engine/grouping.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index 62f37a6..d5b5c4f 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -217,14 +217,13 @@ def group_operator(tlist): def group_identifier_list(tlist): m_role = T.Keyword, ('null', 'role') - m_comma = T.Punctuation, ',' sqlcls = (sql.Function, sql.Case, sql.Identifier, sql.Comparison, sql.IdentifierList, sql.Operation) ttypes = (T_NUMERICAL + T_STRING + T_NAME + (T.Keyword, T.Comment, T.Wildcard)) def match(token): - return imt(token, m=m_comma) + return token.match(T.Punctuation, ',') def valid(token): return imt(token, i=sqlcls, m=m_role, t=ttypes) @@ -275,7 +274,7 @@ def group_aliased(tlist): tidx, token = tlist.token_next_by(i=I_ALIAS, t=T.Number) while token: nidx, next_ = tlist.token_next(tidx) - if imt(next_, i=sql.Identifier): + if isinstance(next_, sql.Identifier): tlist.group_tokens(sql.Identifier, tidx, nidx, extend=True) tidx, token = tlist.token_next_by(i=I_ALIAS, t=T.Number, idx=tidx) |