From af37d16bae4f1c96d3936771d74424d1d54ddf74 Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Sun, 29 May 2016 11:26:43 -0700 Subject: Fix flake8 styling --- sqlparse/engine/grouping.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sqlparse/engine/grouping.py') diff --git a/sqlparse/engine/grouping.py b/sqlparse/engine/grouping.py index c7c0d42..7a93b5e 100644 --- a/sqlparse/engine/grouping.py +++ b/sqlparse/engine/grouping.py @@ -27,15 +27,16 @@ def _group_left_right(tlist, m, cls, if valid_left(left) and valid_right(right): if semicolon: + # only overwrite if a semicolon present. sright = tlist.token_next_by(m=M_SEMICOLON, idx=right) - right = sright or right # only overwrite if a semicolon present. + right = sright or right tokens = tlist.tokens_between(left, right) token = tlist.group_tokens(cls, tokens, extend=True) token = tlist.token_next_by(m=m, idx=token) def _group_matching(tlist, cls): - """Groups Tokens that have beginning and end. ie. parenthesis, brackets..""" + """Groups Tokens that have beginning and end.""" idx = 1 if imt(tlist, i=cls) else 0 token = tlist.token_next_by(m=cls.M_OPEN, idx=idx) -- cgit v1.2.1