summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-07-05 10:39:40 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2016-07-18 07:45:28 -0500
commit199a8af7cc4e75e66cf53c3a2bb4c9b28aec64f1 (patch)
treefb2bcd8d8dcfcd16388f11a038dfb2ff4b11e0e8
parente9f42c1a94f58e5fa916705f67716c26818a7eae (diff)
downloadspack-199a8af7cc4e75e66cf53c3a2bb4c9b28aec64f1.tar.gz
spack-199a8af7cc4e75e66cf53c3a2bb4c9b28aec64f1.tar.bz2
spack-199a8af7cc4e75e66cf53c3a2bb4c9b28aec64f1.tar.xz
spack-199a8af7cc4e75e66cf53c3a2bb4c9b28aec64f1.zip
Flake8
-rw-r--r--lib/spack/spack/cmd/checksum.py19
-rw-r--r--lib/spack/spack/cmd/create.py2
2 files changed, 12 insertions, 9 deletions
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py
index 9cdb0bd012..aedb0fd99c 100644
--- a/lib/spack/spack/cmd/checksum.py
+++ b/lib/spack/spack/cmd/checksum.py
@@ -42,7 +42,8 @@ def setup_parser(subparser):
'--keep-stage', action='store_true', dest='keep_stage',
help="Don't clean up staging area when command completes.")
subparser.add_argument(
- 'versions', nargs=argparse.REMAINDER, help='Versions to generate checksums for')
+ 'versions', nargs=argparse.REMAINDER,
+ help='Versions to generate checksums for')
def get_checksums(versions, urls, **kwargs):
@@ -61,8 +62,8 @@ def get_checksums(versions, urls, **kwargs):
if i == 0 and first_stage_function:
first_stage_function(stage, url)
- hashes.append((version,
- spack.util.crypto.checksum(hashlib.md5, stage.archive_file)))
+ hashes.append((version, spack.util.crypto.checksum(
+ hashlib.md5, stage.archive_file)))
i += 1
except FailedDownloadError as e:
tty.msg("Failed to fetch %s" % url)
@@ -79,12 +80,12 @@ def checksum(parser, args):
# If the user asked for specific versions, use those.
if args.versions:
versions = {}
- for v in args.versions:
- v = ver(v)
- if not isinstance(v, Version):
+ for version in args.versions:
+ version = ver(version)
+ if not isinstance(version, Version):
tty.die("Cannot generate checksums for version lists or " +
"version ranges. Use unambiguous versions.")
- versions[v] = pkg.url_for_version(v)
+ versions[version] = pkg.url_for_version(version)
else:
versions = pkg.fetch_remote_versions()
if not versions:
@@ -111,5 +112,7 @@ def checksum(parser, args):
if not version_hashes:
tty.die("Could not fetch any versions for %s" % pkg.name)
- version_lines = [" version('%s', '%s')" % (v, h) for v, h in version_hashes]
+ version_lines = [
+ " version('%s', '%s')" % (v, h) for v, h in version_hashes
+ ]
tty.msg("Checksummed new versions of %s:" % pkg.name, *version_lines)
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py
index 009b2f308b..2c440096d1 100644
--- a/lib/spack/spack/cmd/create.py
+++ b/lib/spack/spack/cmd/create.py
@@ -124,7 +124,7 @@ install_dict = {
make()
make('install')""",
- 'cmake': """\
+ 'cmake': """\
with working_dir('spack-build', create=True):
# FIXME: Modify the cmake line to suit your build system here.
cmake('..', *std_cmake_args)