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 _raise_error(executable, exe_spec): 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 @@ def target_ranges(self, spec, single_target_fn): 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 @@ def test_undevelop(tmpdir, config, mock_packages, mutable_mock_env_path): 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 _source_single_file(file_and_args, environment): 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 @@ def __call__(self, *args, **kwargs): 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 @@ def streamify(arg, mode): 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.", diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 64dfa37d6b..5cf32c0cab 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1,4 +1,4 @@ -# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT)