Skip to content

Commit

Permalink
Minor consistency for Table.attach_arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mayfield committed Apr 5, 2017
1 parent 01dd4a9 commit 266526e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions shellish/layout/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,20 @@ def attach_render_arguments(cls, parser, prefix='--', excludes=None,
desc = 'Overrides for table render settings.' if desc is None else desc
group = parser.add_argument_group(title, description=desc)
if 'overflow' not in excludes:
group.add_argument('--overflow', choices=cls.overflow_modes,
group.add_argument('%soverflow' % prefix,
choices=cls.overflow_modes,
help='Override the default overflow behavior.')
if 'table_width' not in excludes:
group.add_argument('--table-width', type=int, metavar='COLS',
group.add_argument('%stable-width' % prefix, type=int,
metavar='COLS',
help='Specify the table width in columns.')
if 'column_padding' not in excludes:
group.add_argument('--column-padding', type=int, metavar='COLS',
group.add_argument('%scolumn-padding' % prefix, type=int,
metavar='COLS',
help='Specify whitespace padding for each '
'table column in characters.')
if 'column_align' not in excludes:
group.add_argument('--column-align', metavar='JUSTIFY',
group.add_argument('%scolumn-align' % prefix, metavar='JUSTIFY',
choices={'left', 'center', 'right'},
help='Table column justification.')

Expand Down

0 comments on commit 266526e

Please sign in to comment.