From 14c9381fbe9df8f6c17061e5abcca2a214c51eb5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 00:01:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- executorlib/interactive/executor.py | 3 +-- executorlib/interactive/flux.py | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/executorlib/interactive/executor.py b/executorlib/interactive/executor.py index 568982bc..1f532f79 100644 --- a/executorlib/interactive/executor.py +++ b/executorlib/interactive/executor.py @@ -29,8 +29,7 @@ from executorlib.standalone.thread import RaisingThread try: # The PyFluxExecutor requires flux-base to be installed. - from executorlib.interactive.flux import FluxPythonSpawner - from executorlib.interactive.flux import validate_max_workers + from executorlib.interactive.flux import FluxPythonSpawner, validate_max_workers except ImportError: pass diff --git a/executorlib/interactive/flux.py b/executorlib/interactive/flux.py index 04f25a5c..fd674087 100644 --- a/executorlib/interactive/flux.py +++ b/executorlib/interactive/flux.py @@ -12,7 +12,12 @@ def validate_max_workers(max_workers, cores, threads_per_core): cores_total = flux.resource.list.resource_list(handle).get().up.ncores cores_requested = max_workers * cores * threads_per_core if cores_total < cores_requested: - raise ValueError("The number of requested cores is larger than the available cores " + str(cores_total) + " < " + str(cores_requested)) + raise ValueError( + "The number of requested cores is larger than the available cores " + + str(cores_total) + + " < " + + str(cores_requested) + ) class FluxPythonSpawner(BaseSpawner):