Skip to content

Commit

Permalink
-iv alignment fix (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt authored Jan 26, 2019
1 parent e542a28 commit bf45a20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ optional arguments:

[[top](#sections)]

#### v. 1.8.1 (January 26, 2019)

- Fixes string alignment issues when the `-iv`/`--iversion` flag is used.

#### v. 1.8.0 (January 02, 2019)

- The `-iv`/`--iversion` flag now also shows package versions that were imported as `from X import Y`
Expand Down
2 changes: 1 addition & 1 deletion watermark/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sys


__version__ = '1.8.0'
__version__ = '1.8.1'

if sys.version_info >= (3, 0):
from watermark.watermark import *
Expand Down
4 changes: 3 additions & 1 deletion watermark/watermark.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ def _print_all_import_versions(vars):
imported.__version__))
except AttributeError as e:
continue

longest = max([len(i[0]) for i in to_print]) + 1
for entry in to_print:
print('%-10s%s' % (entry[0], entry[1]))
print(('%s' % entry[0]).ljust(longest) + entry[1])


def load_ipython_extension(ipython):
Expand Down

0 comments on commit bf45a20

Please sign in to comment.