This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a commit to branch jbilleter/black
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 66192ea801da2e00df52113667e7ddd030c380be
Author: Jürg Billeter <[email protected]>
AuthorDate: Fri Aug 7 15:47:08 2026 +0200

    pyproject.toml: Set `target-version` for `black` and reformat
---
 pyproject.toml                                 |  1 +
 src/buildstream/_cas/casdprocessmanager.py     |  4 ++--
 src/buildstream/_elementproxy.py               |  6 +++---
 src/buildstream/_message.py                    |  2 +-
 src/buildstream/_messenger.py                  |  2 +-
 src/buildstream/_pipeline.py                   |  2 +-
 src/buildstream/_project.py                    |  2 +-
 src/buildstream/_scheduler/jobs/job.py         |  2 +-
 src/buildstream/buildelement.py                |  7 ++++---
 src/buildstream/plugin.py                      |  2 +-
 src/buildstream/sandbox/_config.py             |  2 +-
 src/buildstream/sandbox/_sandboxremote.py      |  9 ++++++---
 src/buildstream/sandbox/sandbox.py             |  4 ++--
 src/buildstream/storage/_casbaseddirectory.py  |  8 ++++----
 src/buildstream/storage/_filebaseddirectory.py |  4 ++--
 src/buildstream/storage/directory.py           |  6 +++---
 src/buildstream/utils.py                       | 21 ++++++++++++---------
 tests/artifactcache/config.py                  |  7 ++++---
 tests/artifactcache/junctions.py               |  7 ++++---
 tests/frontend/pull.py                         | 21 ++++++++++++---------
 tests/frontend/push.py                         | 15 +++++++++------
 tests/integration/artifact.py                  |  8 +++++---
 tests/integration/pullbuildtrees.py            |  8 +++++---
 tests/integration/sandbox.py                   |  7 ++++---
 tests/internals/storage.py                     | 17 +++++++++++------
 25 files changed, 100 insertions(+), 74 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 0c0516731..1ec055242 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -24,6 +24,7 @@ requires = [
 build-backend = "setuptools.build_meta"
 
 [tool.black]
+target-version = ["py310", "py311", "py312", "py313", "py314"]
 line-length = 119
 exclude = '''
 (
diff --git a/src/buildstream/_cas/casdprocessmanager.py 
b/src/buildstream/_cas/casdprocessmanager.py
index 1908b5c70..3744617e3 100644
--- a/src/buildstream/_cas/casdprocessmanager.py
+++ b/src/buildstream/_cas/casdprocessmanager.py
@@ -77,7 +77,7 @@ class CASDProcessManager:
         *,
         reserved=None,
         low_watermark=None,
-        local_jobs=None
+        local_jobs=None,
     ):
         os.makedirs(path, exist_ok=True)
 
@@ -160,7 +160,7 @@ class CASDProcessManager:
                 stdout=logfile_fp,
                 stderr=subprocess.STDOUT,
                 env=self.__buildbox_casd_env(),
-                **process_group_kwargs
+                **process_group_kwargs,
             )
 
         self._casd_channel = None
diff --git a/src/buildstream/_elementproxy.py b/src/buildstream/_elementproxy.py
index dc7f03090..d45779f77 100644
--- a/src/buildstream/_elementproxy.py
+++ b/src/buildstream/_elementproxy.py
@@ -98,7 +98,7 @@ class ElementProxy(PluginProxy):
         action: OverlapAction = OverlapAction.WARNING,
         include: Optional[List[str]] = None,
         exclude: Optional[List[str]] = None,
-        orphans: bool = True
+        orphans: bool = True,
     ) -> FileListResult:
 
         owner = cast("Element", self._owner)
@@ -123,7 +123,7 @@ class ElementProxy(PluginProxy):
         action: OverlapAction = OverlapAction.WARNING,
         include: Optional[List[str]] = None,
         exclude: Optional[List[str]] = None,
-        orphans: bool = True
+        orphans: bool = True,
     ) -> None:
         #
         # Same approach used here as in Element.dependencies()
@@ -172,7 +172,7 @@ class ElementProxy(PluginProxy):
         include: Optional[List[str]] = None,
         exclude: Optional[List[str]] = None,
         orphans: bool = True,
-        owner: Optional["Element"] = None
+        owner: Optional["Element"] = None,
     ) -> FileListResult:
         owner = cast("Element", self._owner)
         element = cast("Element", self._plugin)
diff --git a/src/buildstream/_message.py b/src/buildstream/_message.py
index 89f958c51..7b9325de1 100644
--- a/src/buildstream/_message.py
+++ b/src/buildstream/_message.py
@@ -61,7 +61,7 @@ class Message:
         elapsed: Optional[datetime.timedelta] = None,
         logfile: Optional[str] = None,
         sandbox: bool = False,
-        scheduler: bool = False
+        scheduler: bool = False,
     ):
         self.message_type: str = message_type  # Message type
         self.message: str = message  # The message string
diff --git a/src/buildstream/_messenger.py b/src/buildstream/_messenger.py
index fd858b610..d4409217f 100644
--- a/src/buildstream/_messenger.py
+++ b/src/buildstream/_messenger.py
@@ -340,7 +340,7 @@ class Messenger:
         task_name: Optional[str] = None,
         detail: Optional[str] = None,
         silent_nested: bool = False,
-        **kwargs
+        **kwargs,
     ) -> Iterator[Optional[Task]]:
         # Bypass use of State when none exists (e.g. tests)
         if not self._state:
diff --git a/src/buildstream/_pipeline.py b/src/buildstream/_pipeline.py
index da54de206..c65f57416 100644
--- a/src/buildstream/_pipeline.py
+++ b/src/buildstream/_pipeline.py
@@ -78,7 +78,7 @@ def get_selection(
     mode: _PipelineSelection,
     *,
     silent: bool = True,
-    depth_sort: bool = False
+    depth_sort: bool = False,
 ) -> List[Element]:
     def redirect_and_log() -> List[Element]:
         # Redirect and log if permitted
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py
index 252616220..74198fc4c 100644
--- a/src/buildstream/_project.py
+++ b/src/buildstream/_project.py
@@ -89,7 +89,7 @@ class Project:
         parent_loader: Optional[Loader] = None,
         provenance_node: Optional[ProvenanceInformation] = None,
         search_for_project: bool = True,
-        fetch_subprojects=None
+        fetch_subprojects=None,
     ):
         #
         # Public members
diff --git a/src/buildstream/_scheduler/jobs/job.py 
b/src/buildstream/_scheduler/jobs/job.py
index 3ca76aafe..32e7024c2 100644
--- a/src/buildstream/_scheduler/jobs/job.py
+++ b/src/buildstream/_scheduler/jobs/job.py
@@ -206,7 +206,7 @@ class Job:
             message,
             element_name=self._message_element_name,
             element_key=self._message_element_key,
-            **kwargs
+            **kwargs,
         )
         self._messenger.message(message)
 
diff --git a/src/buildstream/buildelement.py b/src/buildstream/buildelement.py
index b98177599..e35f84a8d 100644
--- a/src/buildstream/buildelement.py
+++ b/src/buildstream/buildelement.py
@@ -203,9 +203,10 @@ class BuildElement(Element):
         sorted_envs = sorted(self.__digest_environment)
         for digest_variable in sorted_envs:
             element_list = [element for element, _ in 
self.__digest_environment[digest_variable]]
-            with self.timed_activity(
-                f"Staging dependencies for '{digest_variable}' in subsandbox", 
silent_nested=True
-            ), self.subsandbox(sandbox) as subsandbox:
+            with (
+                self.timed_activity(f"Staging dependencies for 
'{digest_variable}' in subsandbox", silent_nested=True),
+                self.subsandbox(sandbox) as subsandbox,
+            ):
                 self.stage_dependency_artifacts(subsandbox, element_list)
                 digest = subsandbox.get_virtual_directory()._get_digest()
             env[digest_variable] = "{}/{}".format(digest.hash, 
digest.size_bytes)
diff --git a/src/buildstream/plugin.py b/src/buildstream/plugin.py
index eb5679453..8cb031910 100644
--- a/src/buildstream/plugin.py
+++ b/src/buildstream/plugin.py
@@ -590,7 +590,7 @@ class Plugin:
         activity_name: str,
         *,
         detail: Optional[str] = None,
-        silent_nested: bool = False
+        silent_nested: bool = False,
     ) -> T1:
         """Execute a blocking activity in the background.
 
diff --git a/src/buildstream/sandbox/_config.py 
b/src/buildstream/sandbox/_config.py
index 8b29e9111..52818cf3a 100644
--- a/src/buildstream/sandbox/_config.py
+++ b/src/buildstream/sandbox/_config.py
@@ -53,7 +53,7 @@ class SandboxConfig:
         build_uid: Optional[int] = None,
         build_gid: Optional[int] = None,
         remote_apis_socket_path: Optional[str] = None,
-        remote_apis_socket_action_cache_enable_update: bool = False
+        remote_apis_socket_action_cache_enable_update: bool = False,
     ):
         self.build_os = build_os
         self.build_arch = build_arch
diff --git a/src/buildstream/sandbox/_sandboxremote.py 
b/src/buildstream/sandbox/_sandboxremote.py
index 28d6fcb32..0c87a96e3 100644
--- a/src/buildstream/sandbox/_sandboxremote.py
+++ b/src/buildstream/sandbox/_sandboxremote.py
@@ -112,9 +112,12 @@ class SandboxRemote(SandboxREAPI):
 
         # Set up signal handler to trigger cancel_operation on SIGTERM
         operation = None
-        with self._get_context().messenger.timed_activity(
-            "Waiting for the remote build to complete", 
element_name=self._get_element_name()
-        ), _signals.terminator(self.cancel_operation):
+        with (
+            self._get_context().messenger.timed_activity(
+                "Waiting for the remote build to complete", 
element_name=self._get_element_name()
+            ),
+            _signals.terminator(self.cancel_operation),
+        ):
             operation = __run_remote_command(stub, execute_request=request)
             if operation is None:
                 return None
diff --git a/src/buildstream/sandbox/sandbox.py 
b/src/buildstream/sandbox/sandbox.py
index e266a95c3..d8e9ea990 100644
--- a/src/buildstream/sandbox/sandbox.py
+++ b/src/buildstream/sandbox/sandbox.py
@@ -176,7 +176,7 @@ class Sandbox:
         root_read_only: bool = False,
         cwd: Optional[str] = None,
         env: Optional[Dict[str, str]] = None,
-        label: Optional[str] = None
+        label: Optional[str] = None,
     ) -> Optional[int]:
         """Run a command in the sandbox.
 
@@ -343,7 +343,7 @@ class Sandbox:
         flags: int,
         cwd: Optional[str] = None,
         env: Optional[Dict[str, str]] = None,
-        label: Optional[str] = None
+        label: Optional[str] = None,
     ) -> Optional[int]:
         if not self.__allow_run:
             raise _SandboxBug("Element specified BST_RUN_COMMANDS as False but 
called Sandbox.run()")
diff --git a/src/buildstream/storage/_casbaseddirectory.py 
b/src/buildstream/storage/_casbaseddirectory.py
index 2e9f2e714..084ec0105 100644
--- a/src/buildstream/storage/_casbaseddirectory.py
+++ b/src/buildstream/storage/_casbaseddirectory.py
@@ -47,7 +47,7 @@ class _IndexEntry:
         target: Optional[str] = None,
         is_executable: bool = False,
         directory: Optional["CasBasedDirectory"] = None,
-        mtime: Optional[timestamp_pb2.Timestamp] = None  # pylint: 
disable=no-member
+        mtime: Optional[timestamp_pb2.Timestamp] = None,  # pylint: 
disable=no-member
     ) -> None:
         # The CAS cache
         self.cas_cache: CASCache = cas_cache
@@ -132,7 +132,7 @@ class CasBasedDirectory(Directory):
         *,
         digest=None,
         parent: Optional["CasBasedDirectory"] = None,
-        filename: Optional[str] = None
+        filename: Optional[str] = None,
     ) -> None:
         # The CAS cache
         self.__cas_cache: CASCache = cas_cache
@@ -358,7 +358,7 @@ class CasBasedDirectory(Directory):
         filter_callback: Optional[Callable[[str], bool]] = None,
         update_mtime: Optional[float] = None,
         properties: Optional[List[str]] = None,
-        collect_result: bool = True
+        collect_result: bool = True,
     ) -> Optional[FileListResult]:
         result = FileListResult() if collect_result else None
 
@@ -762,7 +762,7 @@ class CasBasedDirectory(Directory):
         *,
         path_prefix: str = "",
         origin: Optional["CasBasedDirectory"] = None,
-        result: Optional[FileListResult]
+        result: Optional[FileListResult],
     ) -> None:
         if origin is None:
             origin = self
diff --git a/src/buildstream/storage/_filebaseddirectory.py 
b/src/buildstream/storage/_filebaseddirectory.py
index 413cab4cd..e33378206 100644
--- a/src/buildstream/storage/_filebaseddirectory.py
+++ b/src/buildstream/storage/_filebaseddirectory.py
@@ -235,7 +235,7 @@ class FileBasedDirectory(Directory):
         filter_callback: Optional[Callable[[str], bool]] = None,
         update_mtime: Optional[float] = None,
         properties: Optional[List[str]] = None,
-        collect_result: bool = True
+        collect_result: bool = True,
     ) -> FileListResult:
 
         # See if we can get a source directory to copy from
@@ -405,7 +405,7 @@ class FileBasedDirectory(Directory):
         *,
         path_prefix: str = "",
         update_mtime: Optional[float] = None,
-        result: FileListResult
+        result: FileListResult,
     ) -> None:
 
         # Iterate over entries in the source directory
diff --git a/src/buildstream/storage/directory.py 
b/src/buildstream/storage/directory.py
index 83762b10d..137e4cbb8 100644
--- a/src/buildstream/storage/directory.py
+++ b/src/buildstream/storage/directory.py
@@ -166,7 +166,7 @@ class Directory:
         external_pathspec: Union["Directory", str],
         *,
         filter_callback: Optional[Callable[[str], bool]] = None,
-        collect_result: bool = True
+        collect_result: bool = True,
     ) -> Optional[FileListResult]:
         """Imports some or all files from external_path into this directory.
 
@@ -405,7 +405,7 @@ class Directory:
         filter_callback: Optional[Callable[[str], bool]] = None,
         update_mtime: Optional[float] = None,
         properties: Optional[List[str]] = None,
-        collect_result: bool = True
+        collect_result: bool = True,
     ) -> Optional[FileListResult]:
         return self._import_files(
             external_pathspec,
@@ -444,7 +444,7 @@ class Directory:
         filter_callback: Optional[Callable[[str], bool]] = None,
         update_mtime: Optional[float] = None,
         properties: Optional[List[str]] = None,
-        collect_result: bool = True
+        collect_result: bool = True,
     ) -> Optional[FileListResult]:
         raise NotImplementedError()
 
diff --git a/src/buildstream/utils.py b/src/buildstream/utils.py
index a645926d7..8673813dc 100644
--- a/src/buildstream/utils.py
+++ b/src/buildstream/utils.py
@@ -440,7 +440,7 @@ def copy_files(
     *,
     filter_callback: Optional[Callable[[str], bool]] = None,
     ignore_missing: bool = False,
-    report_written: bool = False
+    report_written: bool = False,
 ) -> FileListResult:
     """Copy files from source to destination.
 
@@ -490,7 +490,7 @@ def link_files(
     *,
     filter_callback: Optional[Callable[[str], bool]] = None,
     ignore_missing: bool = False,
-    report_written: bool = False
+    report_written: bool = False,
 ) -> FileListResult:
     """Hardlink files from source to destination.
 
@@ -630,7 +630,7 @@ def save_file_atomic(
     newline: Optional[str] = None,
     closefd: bool = True,
     opener: Optional[Callable[[str, int], int]] = None,
-    tempdir: Optional[str] = None
+    tempdir: Optional[str] = None,
 ) -> Iterator[IO]:
     """Save a file with a temporary name and rename it into place when ready.
 
@@ -1275,9 +1275,10 @@ def _tempnamedfile(mode="w+b", encoding=None, suffix="", 
prefix="tmp", dir=None)
         if temp is not None:
             temp.close()
 
-    with _signals.terminator(close_tempfile), tempfile.NamedTemporaryFile(
-        mode=mode, encoding=encoding, suffix=suffix, prefix=prefix, dir=dir
-    ) as temp:
+    with (
+        _signals.terminator(close_tempfile),
+        tempfile.NamedTemporaryFile(mode=mode, encoding=encoding, 
suffix=suffix, prefix=prefix, dir=dir) as temp,
+    ):
         yield temp
 
 
@@ -1375,9 +1376,11 @@ def _call(*popenargs, terminate=False, **kwargs):
             group_id = os.getpgid(process.pid)
             os.killpg(group_id, signal.SIGCONT)
 
-    with _signals.suspendable(suspend_proc, resume_proc), 
_signals.terminator(kill_proc), subprocess.Popen(
-        *popenargs, universal_newlines=True, **kwargs
-    ) as process:
+    with (
+        _signals.suspendable(suspend_proc, resume_proc),
+        _signals.terminator(kill_proc),
+        subprocess.Popen(*popenargs, universal_newlines=True, **kwargs) as 
process,
+    ):
         # Here, we don't use `process.communicate()` directly without a timeout
         # This is because, if we were to do that, and the process would never
         # output anything, the control would never be given back to the python
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py
index 70c3b2cd4..8324e4397 100644
--- a/tests/artifactcache/config.py
+++ b/tests/artifactcache/config.py
@@ -112,9 +112,10 @@ def test_artifact_cache_precedence(tmpdir, 
override_caches, project_caches, user
     project_config_file = str(project_dir.join("project.conf"))
     _yaml.roundtrip_dump(project_config, file=project_config_file)
 
-    with runcli.configured(str(tmpdir), user_config) as user_config_file, 
dummy_context(
-        config=user_config_file
-    ) as context:
+    with (
+        runcli.configured(str(tmpdir), user_config) as user_config_file,
+        dummy_context(config=user_config_file) as context,
+    ):
         project = Project(str(project_dir), context)
         project.ensure_fully_loaded()
 
diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py
index 8f5e5218b..41cc60fa0 100644
--- a/tests/artifactcache/junctions.py
+++ b/tests/artifactcache/junctions.py
@@ -42,9 +42,10 @@ def test_push_pull(cli, tmpdir, datafiles):
     project = os.path.join(str(datafiles), "parent")
     base_project = os.path.join(str(project), "base")
 
-    with create_artifact_share(os.path.join(str(tmpdir), 
"artifactshare-parent")) as share, create_artifact_share(
-        os.path.join(str(tmpdir), "artifactshare-base")
-    ) as base_share:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), 
"artifactshare-parent")) as share,
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare-base")) 
as base_share,
+    ):
 
         # First build it without the artifact cache configured
         result = cli.run(project=project, args=["build", "target.bst"])
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index 2c804e190..e677a0795 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -101,9 +101,10 @@ def test_push_pull_deps(cli, tmpdir, datafiles, deps, 
expected_states):
 def test_pull_secondary_cache(cli, tmpdir, datafiles):
     project = str(datafiles)
 
-    with create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
share1, create_artifact_share(
-        os.path.join(str(tmpdir), "artifactshare2")
-    ) as share2:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
share1,
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare2")) as 
share2,
+    ):
 
         # Build the target and push it to share2 only.
         cli.configure(
@@ -149,9 +150,10 @@ def test_pull_secondary_cache(cli, tmpdir, datafiles):
 def test_push_pull_specific_remote(cli, tmpdir, datafiles):
     project = str(datafiles)
 
-    with create_artifact_share(os.path.join(str(tmpdir), "goodartifactshare")) 
as good_share, create_artifact_share(
-        os.path.join(str(tmpdir), "badartifactshare")
-    ) as bad_share:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "goodartifactshare")) 
as good_share,
+        create_artifact_share(os.path.join(str(tmpdir), "badartifactshare")) 
as bad_share,
+    ):
 
         # Build the target so we have it cached locally only.
         result = cli.run(project=project, args=["build", "target.bst"])
@@ -430,9 +432,10 @@ def test_build_remote_option(caplog, cli, tmpdir, 
datafiles):
     project = str(datafiles)
     caplog.set_level(1)
 
-    with create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
shareuser, create_artifact_share(
-        os.path.join(str(tmpdir), "artifactshare2")
-    ) as sharecli:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
shareuser,
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare2")) as 
sharecli,
+    ):
 
         # Configure shareuser remote in user conf
         cli.configure({"artifacts": {"servers": [{"url": shareuser.repo, 
"push": True}]}})
diff --git a/tests/frontend/push.py b/tests/frontend/push.py
index a25152147..e9c74c145 100644
--- a/tests/frontend/push.py
+++ b/tests/frontend/push.py
@@ -399,9 +399,10 @@ def test_push_after_pull(cli, tmpdir, datafiles):
     project = str(datafiles)
 
     # Set up two artifact shares.
-    with create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
share1, create_artifact_share(
-        os.path.join(str(tmpdir), "artifactshare2")
-    ) as share2:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
share1,
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare2")) as 
share2,
+    ):
 
         # Set the scene: share1 has the artifact, share2 does not.
         #
@@ -690,9 +691,11 @@ def test_build_remote_option(caplog, cli, tmpdir, 
datafiles, use_remote, ignore_
     project = str(datafiles)
     caplog.set_level(1)
 
-    with create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
shareuser, create_artifact_share(
-        os.path.join(str(tmpdir), "artifactshare2")
-    ) as shareproject, create_artifact_share(os.path.join(str(tmpdir), 
"artifactshare3")) as sharecli:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare1")) as 
shareuser,
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare2")) as 
shareproject,
+        create_artifact_share(os.path.join(str(tmpdir), "artifactshare3")) as 
sharecli,
+    ):
 
         # Add shareproject repo url to project.conf
         with open(os.path.join(project, "project.conf"), "a", 
encoding="utf-8") as projconf:
diff --git a/tests/integration/artifact.py b/tests/integration/artifact.py
index e256cda64..9b1fb1ac9 100644
--- a/tests/integration/artifact.py
+++ b/tests/integration/artifact.py
@@ -51,9 +51,11 @@ def test_cache_buildtrees(cli, tmpdir, datafiles):
     cwd = str(tmpdir)
 
     # Create artifact shares for pull & push testing
-    with create_artifact_share(os.path.join(str(tmpdir), "share1")) as share1, 
create_artifact_share(
-        os.path.join(str(tmpdir), "share2")
-    ) as share2, create_artifact_share(os.path.join(str(tmpdir), "share3")) as 
share3:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "share1")) as share1,
+        create_artifact_share(os.path.join(str(tmpdir), "share2")) as share2,
+        create_artifact_share(os.path.join(str(tmpdir), "share3")) as share3,
+    ):
         cli.configure({"artifacts": {"servers": [{"url": share1.repo, "push": 
True}]}, "cachedir": str(tmpdir)})
 
         # Build autotools element with the default behavior of caching 
buildtrees
diff --git a/tests/integration/pullbuildtrees.py 
b/tests/integration/pullbuildtrees.py
index 243a6e27e..8392c6d84 100644
--- a/tests/integration/pullbuildtrees.py
+++ b/tests/integration/pullbuildtrees.py
@@ -59,9 +59,11 @@ def test_pullbuildtrees(cli2, tmpdir, datafiles):
     cwd = str(tmpdir)
 
     # Create artifact shares for pull & push testing
-    with create_artifact_share(os.path.join(str(tmpdir), "share1")) as share1, 
create_artifact_share(
-        os.path.join(str(tmpdir), "share2")
-    ) as share2, create_artifact_share(os.path.join(str(tmpdir), "share3")) as 
share3:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "share1")) as share1,
+        create_artifact_share(os.path.join(str(tmpdir), "share2")) as share2,
+        create_artifact_share(os.path.join(str(tmpdir), "share3")) as share3,
+    ):
         cli2.configure(
             {
                 "artifacts": {"servers": [{"url": share1.repo, "push": True}]},
diff --git a/tests/integration/sandbox.py b/tests/integration/sandbox.py
index 5e3898b9d..4144f071d 100644
--- a/tests/integration/sandbox.py
+++ b/tests/integration/sandbox.py
@@ -144,9 +144,10 @@ def 
test_remote_apis_socket_with_two_storage_services_and_action_cache(cli, tmpd
     project = str(datafiles)
     element_name = "sandbox/remote-apis-socket.bst"
 
-    with create_artifact_share(os.path.join(str(tmpdir), "remote1")) as 
share1, create_artifact_share(
-        os.path.join(str(tmpdir), "remote2")
-    ) as share2:
+    with (
+        create_artifact_share(os.path.join(str(tmpdir), "remote1")) as share1,
+        create_artifact_share(os.path.join(str(tmpdir), "remote2")) as share2,
+    ):
         cli.configure(
             {
                 "cache": {
diff --git a/tests/internals/storage.py b/tests/internals/storage.py
index f3b4031cb..f005ea839 100644
--- a/tests/internals/storage.py
+++ b/tests/internals/storage.py
@@ -73,9 +73,11 @@ def test_merge_same_casdirs(tmpdir, datafiles, directories):
         clear_gitkeeps(directory)
         utime_recursively(directory, (100, 100))
 
-    with setup_backend(CasBasedDirectory, str(tmpdir)) as c, setup_backend(
-        CasBasedDirectory, str(tmpdir)
-    ) as a, setup_backend(CasBasedDirectory, str(tmpdir)) as b:
+    with (
+        setup_backend(CasBasedDirectory, str(tmpdir)) as c,
+        setup_backend(CasBasedDirectory, str(tmpdir)) as a,
+        setup_backend(CasBasedDirectory, str(tmpdir)) as b,
+    ):
         a.import_files(before)
         b.import_files(after)
         c.import_files(buildtree)
@@ -150,9 +152,12 @@ def test_merge_casdir_properties(tmpdir, datafiles, 
modification):
 def _test_merge_dirs(
     before: str, after: str, buildtree: str, tmpdir: str, properties: 
Optional[List[str]] = None
 ) -> bool:
-    with setup_backend(CasBasedDirectory, tmpdir) as c, setup_backend(
-        CasBasedDirectory, tmpdir
-    ) as copy, setup_backend(CasBasedDirectory, tmpdir) as a, 
setup_backend(CasBasedDirectory, tmpdir) as b:
+    with (
+        setup_backend(CasBasedDirectory, tmpdir) as c,
+        setup_backend(CasBasedDirectory, tmpdir) as copy,
+        setup_backend(CasBasedDirectory, tmpdir) as a,
+        setup_backend(CasBasedDirectory, tmpdir) as b,
+    ):
         a._import_files_internal(before, properties=properties)
         b._import_files_internal(after, properties=properties)
         c._import_files_internal(buildtree, properties=properties)

Reply via email to