pidgin/purple-plugin-pack

Clean up some string formatting

2017-05-25, Gary Kramlich
188f4388fd86
Parents e7a8f00e8000
Children 1f14f6bf2b30
Clean up some string formatting
--- a/plugin_pack.py Wed Apr 05 22:13:09 2017 -0500
+++ b/plugin_pack.py Thu May 25 21:17:04 2017 -0500
@@ -353,7 +353,7 @@
print('++-{}-{}-{}'.format('=' * (widths[0]), '=' * (widths[1]), '=' * (widths[2])))
# create the format var
- fmt = '{}{} {:<' + widths[0] + '} {:<' + widths[1] + '} {}'
+ fmt = '{}{} {:<' + str(widths[0]) + '} {:<' + str(widths[1]) + '} {}'
# now loop through the list again, with everything formatted
list = data.keys()
@@ -519,7 +519,7 @@
counts['pidgin'] = len(self.pidgin_plugins())
def value(val):
- return "%3d ({:6.2}%)".format(val, (float(val) / float(counts['total'])) * 100.0)
+ return "{:3d} ({:6.2}%)".format(val, (float(val) / float(counts['total'])) * 100.0)
print('{}\n\n{}\n\n{}\n{}\n{}\n{}\n\n{}\n{}\n{}\n{}'.format(
"Purple Plugin Pack Stats", "{} plugins in total".format(counts['total']),