diff options
| author | Adam Greenhall <agreenhall@lyft.com> | 2015-09-14 09:36:38 -0700 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-06 06:31:35 -0700 |
| commit | 035ffb8e61b2cda516ae448246df36451ff6d14b (patch) | |
| tree | 71112ff82ba604da4c3598568ea055cba743e63f | |
| parent | 2928a7c8f1192b8376795368825c2cf2dae243c3 (diff) | |
| download | sqlparse-035ffb8e61b2cda516ae448246df36451ff6d14b.tar.gz | |
Fix Options
| -rwxr-xr-x | bin/sqlformat | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/sqlformat b/bin/sqlformat index fa20ded..3f61064 100755 --- a/bin/sqlformat +++ b/bin/sqlformat @@ -7,16 +7,13 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import optparse -import os import sys import sqlparse from sqlparse.exceptions import SQLParseError - _CASE_CHOICES = ['upper', 'lower', 'capitalize'] - parser = optparse.OptionParser(usage='%prog [OPTIONS] FILE, ...', version='%%prog %s' % sqlparse.__version__) parser.set_description(('Format FILE according to OPTIONS. Use "-" as FILE ' @@ -45,6 +42,12 @@ group.add_option('-r', '--reindent', dest='reindent', help='reindent statements') group.add_option('--indent_width', dest='indent_width', default=2, help='indentation width (defaults to 2 spaces)') +group.add_option('-a', '--reindent_aligned', + action='store_true', default=False, + help='reindent statements to aligned format') +group.add_option('-s', '--use_space_around_operators', + action='store_true', default=False, + help='place spaces around mathematical operators') group.add_option('--wrap_after', dest='wrap_after', default=0, help='Column after which lists should be wrapped') |
