Skip to content

Commit

Permalink
Fix alignment for version number in search (pypa#1415)
Browse files Browse the repository at this point in the history
Thanks @gvalkov for the suggestion.

Signed-off-by: Rohan Jain <[email protected]>
  • Loading branch information
crodjer committed Jan 27, 2014
1 parent 084dcd5 commit 6203429
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pip/commands/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ def print_results(hits, name_column_width=25, terminal_width=None):
# wrap and indent summary to fit terminal
summary = textwrap.wrap(summary, terminal_width - name_column_width - 5)
summary = ('\n' + ' ' * (name_column_width + 3)).join(summary)
line = '%s (%s) - %s' % (name.ljust(name_column_width), version,
summary)

line = '%-*s - %s' % (name_column_width,
'%s (%s)' % (name, version), summary)
try:
logger.notify(line)
if name in installed_packages:
Expand Down

0 comments on commit 6203429

Please sign in to comment.