fixing flake8 issues
This commit is contained in:
parent
a4ac99877a
commit
0743ef4d0b
@ -28,9 +28,11 @@
|
|||||||
from llnl.util.tty.colify import colify
|
from llnl.util.tty.colify import colify
|
||||||
|
|
||||||
import spack
|
import spack
|
||||||
import fnmatch, re
|
import fnmatch
|
||||||
|
import re
|
||||||
|
|
||||||
|
description = "List available spack packages"
|
||||||
|
|
||||||
description ="List available spack packages"
|
|
||||||
|
|
||||||
def setup_parser(subparser):
|
def setup_parser(subparser):
|
||||||
subparser.add_argument(
|
subparser.add_argument(
|
||||||
@ -76,10 +78,10 @@ def match(p, f):
|
|||||||
pkgs = [p for p in pkgs if any(match(p, f) for f in res)]
|
pkgs = [p for p in pkgs if any(match(p, f) for f in res)]
|
||||||
|
|
||||||
# sort before displaying.
|
# sort before displaying.
|
||||||
sorted_packages = sorted(pkgs, key=lambda s:s.lower())
|
sorted_packages = sorted(pkgs, key=lambda s: s.lower())
|
||||||
|
|
||||||
# Print all the package names in columns
|
# Print all the package names in columns
|
||||||
indent=0
|
indent = 0
|
||||||
if sys.stdout.isatty():
|
if sys.stdout.isatty():
|
||||||
tty.msg("%d packages." % len(sorted_packages))
|
tty.msg("%d packages." % len(sorted_packages))
|
||||||
colify(sorted_packages, indent=indent)
|
colify(sorted_packages, indent=indent)
|
||||||
|
Loading…
Reference in New Issue
Block a user