summaryrefslogtreecommitdiff
path: root/sqlparse/engine
diff options
context:
space:
mode:
authorVictor Uriarte <victor.m.uriarte@intel.com>2016-08-22 19:29:45 -0700
committerVictor Uriarte <victor.m.uriarte@intel.com>2016-08-22 19:29:45 -0700
commita36008a235e31bc24b9d42a3a69b479031f024f9 (patch)
tree39fe3c9b45e0e4c085458116ee641af982f1b945 /sqlparse/engine
parentae0532678b0fdc859cae021ee135579d875a24a8 (diff)
downloadsqlparse-a36008a235e31bc24b9d42a3a69b479031f024f9.tar.gz
Unify_naming_schema. Closes #283
Diffstat (limited to 'sqlparse/engine')
-rw-r--r--sqlparse/engine/grouping.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py
index 42305c3..ec3a5d4 100644
--- a/sqlparse/engine/grouping.py
+++ b/sqlparse/engine/grouping.py
@@ -21,13 +21,13 @@ def _group_matching(tlist, cls):
for idx, token in enumerate(list(tlist)):
tidx = idx - tidx_offset
- if token.is_whitespace():
+ if token.is_whitespace:
# ~50% of tokens will be whitespace. Will checking early
# for them avoid 3 comparisons, but then add 1 more comparison
# for the other ~50% of tokens...
continue
- if token.is_group() and not isinstance(token, cls):
+ if token.is_group and not isinstance(token, cls):
# Check inside previously grouped (ie. parenthesis) if group
# of differnt type is inside (ie, case). though ideally should
# should check for all open/close tokens at once to avoid recursion
@@ -246,7 +246,7 @@ def group_comments(tlist):
tidx, token = tlist.token_next_by(t=T.Comment)
while token:
eidx, end = tlist.token_not_matching(
- lambda tk: imt(tk, t=T.Comment) or tk.is_whitespace(), idx=tidx)
+ lambda tk: imt(tk, t=T.Comment) or tk.is_whitespace, idx=tidx)
if end is not None:
eidx, end = tlist.token_prev(eidx, skip_ws=False)
tlist.group_tokens(sql.Comment, tidx, eidx)
@@ -372,10 +372,10 @@ def _group(tlist, cls, match,
for idx, token in enumerate(list(tlist)):
tidx = idx - tidx_offset
- if token.is_whitespace():
+ if token.is_whitespace:
continue
- if recurse and token.is_group() and not isinstance(token, cls):
+ if recurse and token.is_group and not isinstance(token, cls):
_group(token, cls, match, valid_prev, valid_next, post, extend)
if match(token):