style: ensure that all packages pass spack style -a
- fix trailing whitespace and other issues uncovered by better flake8 checking. - fix extra whitespace printed by `spack style` command
This commit is contained in:
@@ -111,7 +111,7 @@ def lines(self):
|
||||
yield ' None'
|
||||
else:
|
||||
yield ' ' + self.fmt % self.headers
|
||||
underline = tuple([l * "=" for l in self.column_widths])
|
||||
underline = tuple([w * "=" for w in self.column_widths])
|
||||
yield ' ' + self.fmt % underline
|
||||
yield ''
|
||||
for k, v in sorted(self.variants.items()):
|
||||
|
@@ -183,6 +183,8 @@ def cwd_relative(path):
|
||||
)
|
||||
|
||||
for line in output.split("\n"):
|
||||
if not line:
|
||||
continue
|
||||
print(
|
||||
re_obj.sub(
|
||||
cwd_relative,
|
||||
|
@@ -51,8 +51,11 @@ def test_direct_installed_dependencies(mock_packages, database):
|
||||
with color_when(False):
|
||||
out = dependencies('--installed', 'mpileaks^mpich')
|
||||
|
||||
lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
|
||||
hashes = set([re.split(r'\s+', l)[0] for l in lines])
|
||||
lines = [
|
||||
line for line in out.strip().split('\n')
|
||||
if not line.startswith('--')
|
||||
]
|
||||
hashes = set([re.split(r'\s+', line)[0] for line in lines])
|
||||
|
||||
expected = set([spack.store.db.query_one(s).dag_hash(7)
|
||||
for s in ['mpich', 'callpath^mpich']])
|
||||
@@ -65,8 +68,11 @@ def test_transitive_installed_dependencies(mock_packages, database):
|
||||
with color_when(False):
|
||||
out = dependencies('--installed', '--transitive', 'mpileaks^zmpi')
|
||||
|
||||
lines = [l for l in out.strip().split('\n') if not l.startswith('--')]
|
||||
hashes = set([re.split(r'\s+', l)[0] for l in lines])
|
||||
lines = [
|
||||
line for line in out.strip().split('\n')
|
||||
if not line.startswith('--')
|
||||
]
|
||||
hashes = set([re.split(r'\s+', line)[0] for line in lines])
|
||||
|
||||
expected = set([spack.store.db.query_one(s).dag_hash(7)
|
||||
for s in ['zmpi', 'callpath^zmpi', 'fake',
|
||||
|
Reference in New Issue
Block a user