Improve info variant header (#14275)

In "spack info" the Variants header currently has two blank
lines under it. That's too much. It looks like the actual
content belongs to something else.

Instead underline the headers to make things more obvious.
This commit is contained in:
Dr. Christian Tacke 2019-12-28 00:21:15 +01:00 committed by Todd Gamblin
parent 2166a91ec5
commit 8ee75e19bd

View File

@ -106,7 +106,9 @@ def lines(self):
yield ' None'
else:
yield ' ' + self.fmt % self.headers
yield '\n'
underline = tuple([l * "=" for l in self.column_widths])
yield ' ' + self.fmt % underline
yield ''
for k, v in sorted(self.variants.items()):
name = textwrap.wrap(
'{0} [{1}]'.format(k, self.default(v)),