summaryrefslogtreecommitdiff
path: root/sqlparse/engine
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2016-08-24 14:59:28 +0200
committerGitHub <noreply@github.com>2016-08-24 14:59:28 +0200
commit791a3312a247670cdeed61e52e8ca449dbb27afa (patch)
treebc386cace78549766f46475f037a760335eb447b /sqlparse/engine
parent31830af6355557ec159d2173b12ad1437f49b447 (diff)
parenta36008a235e31bc24b9d42a3a69b479031f024f9 (diff)
downloadsqlparse-791a3312a247670cdeed61e52e8ca449dbb27afa.tar.gz
Merge pull request #285 from vmuriart/unify_naming_schema
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 7cbcc6b..258abc8 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):