summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-05-21 21:29:30 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2021-05-22 14:57:30 -0700
commit80f0c78f00732024f86b58485b872bc43bc428be (patch)
tree4fa1d8f1724d79f38efb4896c7b3c2e314824e77 /lib
parent818664d55aa324430e770188f1116248f4966e68 (diff)
downloadspack-80f0c78f00732024f86b58485b872bc43bc428be.tar.gz
spack-80f0c78f00732024f86b58485b872bc43bc428be.tar.bz2
spack-80f0c78f00732024f86b58485b872bc43bc428be.tar.xz
spack-80f0c78f00732024f86b58485b872bc43bc428be.zip
Style fixes for v0.16.2 release
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/bootstrap.py4
-rw-r--r--lib/spack/spack/cmd/location.py4
-rw-r--r--lib/spack/spack/solver/asp.py4
-rw-r--r--lib/spack/spack/store.py3
-rw-r--r--lib/spack/spack/test/cmd/undevelop.py4
-rw-r--r--lib/spack/spack/util/environment.py3
-rw-r--r--lib/spack/spack/util/executable.py10
7 files changed, 21 insertions, 11 deletions
diff --git a/lib/spack/spack/bootstrap.py b/lib/spack/spack/bootstrap.py
index ce9b720163..f8d0703174 100644
--- a/lib/spack/spack/bootstrap.py
+++ b/lib/spack/spack/bootstrap.py
@@ -198,7 +198,9 @@ def get_executable(exe, spec=None, install=False):
def _bootstrap_config_scopes():
tty.debug('[BOOTSTRAP CONFIG SCOPE] name=_builtin')
config_scopes = [
- spack.config.InternalConfigScope('_builtin', spack.config.config_defaults)
+ spack.config.InternalConfigScope(
+ '_builtin', spack.config.config_defaults
+ )
]
for name, path in spack.config.configuration_paths:
platform = spack.architecture.platform().name
diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py
index 3b72de978b..650e8a477a 100644
--- a/lib/spack/spack/cmd/location.py
+++ b/lib/spack/spack/cmd/location.py
@@ -119,8 +119,8 @@ def location(parser, args):
if args.build_dir:
# Out of source builds have build_directory defined
if hasattr(pkg, 'build_directory'):
- # build_directory can be either absolute or relative to the stage path
- # in either case os.path.join makes it absolute
+ # build_directory can be either absolute or relative to the
+ # stage path in either case os.path.join makes it absolute
print(os.path.normpath(os.path.join(
pkg.stage.path,
pkg.build_directory
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index 30de581cbd..dbfca6506d 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -492,7 +492,9 @@ class SpackSolverSetup(object):
def conflict_rules(self, pkg):
for trigger, constraints in pkg.conflicts.items():
- trigger_id = self.condition(spack.spec.Spec(trigger), name=pkg.name)
+ trigger_id = self.condition(
+ spack.spec.Spec(trigger), name=pkg.name
+ )
self.gen.fact(fn.conflict_trigger(trigger_id))
for constraint, _ in constraints:
diff --git a/lib/spack/spack/store.py b/lib/spack/spack/store.py
index 6dbd2befb9..157ba00be6 100644
--- a/lib/spack/spack/store.py
+++ b/lib/spack/spack/store.py
@@ -258,7 +258,8 @@ def use_store(store_or_path):
"""Use the store passed as argument within the context manager.
Args:
- store_or_path: either a Store object ot a path to where the store resides
+ store_or_path: either a Store object ot a path to where the
+ store resides
Returns:
Store object associated with the context manager's store
diff --git a/lib/spack/spack/test/cmd/undevelop.py b/lib/spack/spack/test/cmd/undevelop.py
index 493bb99228..2e897e77f3 100644
--- a/lib/spack/spack/test/cmd/undevelop.py
+++ b/lib/spack/spack/test/cmd/undevelop.py
@@ -39,7 +39,9 @@ env:
assert not after.satisfies('dev_path=*')
-def test_undevelop_nonexistent(tmpdir, config, mock_packages, mutable_mock_env_path):
+def test_undevelop_nonexistent(
+ tmpdir, config, mock_packages, mutable_mock_env_path
+):
# setup environment
envdir = tmpdir.mkdir('env')
with envdir.as_cwd():
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py
index c4e7ea3260..6d299fa7ef 100644
--- a/lib/spack/spack/util/environment.py
+++ b/lib/spack/spack/util/environment.py
@@ -943,7 +943,8 @@ def environment_after_sourcing_files(*files, **kwargs):
concatenate_on_success, dump_environment,
])
output = shell(
- source_file_arguments, output=str, env=environment, ignore_quotes=True
+ source_file_arguments, output=str, env=environment,
+ ignore_quotes=True
)
environment = json.loads(output)
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py
index c01ae1b61b..8baea6d238 100644
--- a/lib/spack/spack/util/executable.py
+++ b/lib/spack/spack/util/executable.py
@@ -92,8 +92,8 @@ class Executable(object):
ignore_errors (int or list): A list of error codes to ignore.
If these codes are returned, this process will not raise
an exception even if ``fail_on_error`` is set to ``True``
- ignore_quotes (bool): If False, warn users that quotes are not needed
- as Spack does not use a shell. Defaults to False.
+ ignore_quotes (bool): If False, warn users that quotes are not
+ needed as Spack does not use a shell. Defaults to False.
input: Where to read stdin from
output: Where to send stdout
error: Where to send stderr
@@ -168,12 +168,14 @@ class Executable(object):
istream, close_istream = streamify(input, 'r')
if not ignore_quotes:
- quoted_args = [arg for arg in args if re.search(r'^"|^\'|"$|\'$', arg)]
+ quoted_args = [
+ arg for arg in args if re.search(r'^"|^\'|"$|\'$', arg)
+ ]
if quoted_args:
tty.warn(
"Quotes in command arguments can confuse scripts like"
" configure.",
- "The following arguments may cause problems when executed:",
+ "These arguments may cause problems when executed:",
str("\n".join([" " + arg for arg in quoted_args])),
"Quotes aren't needed because spack doesn't use a shell. "
"Consider removing them.",