[Git][reproducible-builds/diffoscope][master] Drop extra whitespace in supported file format output.

Chris Lamb gitlab at salsa.debian.org
Wed May 16 19:17:42 CEST 2018


Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
c1d61eb6 by Chris Lamb at 2018-05-16T19:17:29+02:00
Drop extra whitespace in supported file format output.

- - - - -


1 changed file:

- diffoscope/main.py


Changes:

=====================================
diffoscope/main.py
=====================================
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -276,9 +276,13 @@ class HelpFormatter(argparse.HelpFormatter):
         if not set(sys.argv) & {'--help', '-h'}:
             return val
 
-        val = '{}\n\nfile formats supported:\n'.format(val)
-        for x in sorted(ComparatorManager().get_descriptions(), key=str.title):
-            val = '{}{}- {}{}.\n\n'.format(val, ' ' * 24, x[0].upper(), x[1:])
+        descriptions = list(sorted(ComparatorManager().get_descriptions()))
+        val = '{}\n\nfile formats supported:\n{}{} and {}.\n'.format(
+            val,
+            ' ' * 24,
+            ', '.join(descriptions[:-1]),
+            descriptions[-1],
+        )
         return val
 
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/c1d61eb612e1384969034756d7bed632998bd5e4

---
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/c1d61eb612e1384969034756d7bed632998bd5e4
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20180516/311f7f0a/attachment.html>


More information about the rb-commits mailing list