summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorJohn Bodley <john.bodley@airbnb.com>2019-02-27 21:18:50 -0800
committerAndi Albrecht <albrecht.andi@gmail.com>2019-03-10 08:09:46 +0100
commit5faadeba8e337a7344907e1eae2abb07392d9ce0 (patch)
treedcf7b9822c0951119a52ddde620fe5f91b920d04 /sqlparse
parent060b2646af659443754ac880ed657f27241eb3b0 (diff)
downloadsqlparse-5faadeba8e337a7344907e1eae2abb07392d9ce0.tar.gz
[filters] Stripping parenthesis whitespace
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/filters/others.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlparse/filters/others.py b/sqlparse/filters/others.py
index 408f5d2..52b8617 100644
--- a/sqlparse/filters/others.py
+++ b/sqlparse/filters/others.py
@@ -76,9 +76,9 @@ class StripWhitespaceFilter(object):
return self._stripws_default(tlist)
def _stripws_parenthesis(self, tlist):
- if tlist.tokens[1].is_whitespace:
+ while tlist.tokens[1].is_whitespace:
tlist.tokens.pop(1)
- if tlist.tokens[-2].is_whitespace:
+ while tlist.tokens[-2].is_whitespace:
tlist.tokens.pop(-2)
self._stripws_default(tlist)