Skip to content

Commit 3ea660e

Browse files
committed
Code cleanup.
1 parent 974617d commit 3ea660e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

sqlparse/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ def create_parser():
138138
default=False,
139139
type=bool,
140140
help='Insert linebreak before comma (default False)')
141-
141+
142142
group.add_argument(
143143
'--compact',
144144
dest='compact',
145145
default=False,
146146
type=bool,
147147
help='Try to produce more compact output (default False)')
148-
148+
149149
group.add_argument(
150150
'--encoding',
151151
dest='encoding',

sqlparse/filters/reindent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ def _process_case(self, tlist):
200200
str_cond = ''.join(str(x) for x in cond or [])
201201
str_value = ''.join(str(x) for x in value)
202202
end_pos = self.offset + 1 + len(str_cond) + len(str_value)
203-
if (not self.compact
204-
and end_pos > self.wrap_after):
203+
if (not self.compact and end_pos > self.wrap_after):
205204
token = value[0] if cond is None else cond[0]
206205
tlist.insert_before(token, self.nl())
207206

sqlparse/formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from sqlparse.exceptions import SQLParseError
1212

1313

14-
def validate_options(options):
14+
def validate_options(options): # noqa: C901
1515
"""Validates options."""
1616
kwcase = options.get('keyword_case')
1717
if kwcase not in [None, 'upper', 'lower', 'capitalize']:
@@ -115,7 +115,7 @@ def validate_options(options):
115115
if comma_first not in [True, False]:
116116
raise SQLParseError('comma_first requires a boolean value')
117117
options['comma_first'] = comma_first
118-
118+
119119
compact = options.get('compact', False)
120120
if compact not in [True, False]:
121121
raise SQLParseError('compact requires a boolean value')

0 commit comments

Comments
 (0)