From 4700eac5317498c46b4b3081e28f4cc22df64578 Mon Sep 17 00:00:00 2001 From: Stefano Garzarella Date: Mon, 2 Sep 2024 09:41:57 +0200 Subject: [PATCH] autogenerate_pipeline.py: fix formatting issues The last commit made `black` unhappy. Let's fix the formatting issues suggested by `black`. Signed-off-by: Stefano Garzarella --- .buildkite/autogenerate_pipeline.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.buildkite/autogenerate_pipeline.py b/.buildkite/autogenerate_pipeline.py index 09c0c5f..831cbab 100755 --- a/.buildkite/autogenerate_pipeline.py +++ b/.buildkite/autogenerate_pipeline.py @@ -85,6 +85,7 @@ DEFAULT_AGENT_TAG_HYPERVISOR = os.getenv("DEFAULT_AGENT_TAG_HYPERVISOR", "kvm") BUILDKITE_PATH = pathlib.Path(__file__).parent.resolve() + class BuildkiteStep: """ This builds a Buildkite step according to a json configuration and the @@ -246,7 +247,9 @@ class BuildkiteStep: # Wrap command with '' to avoid escaping early by `ENTRYPOINT` command = json.dumps(command) # Overwrite image tag for riscv64 platform CI - self.step_config["plugins"][0][f"docker#{DOCKER_PLUGIN_VERSION}"]["image"] = f"rustvmm/dev:{CONTAINER_VERSION_RISCV}" + self.step_config["plugins"][0][f"docker#{DOCKER_PLUGIN_VERSION}"][ + "image" + ] = f"rustvmm/dev:{CONTAINER_VERSION_RISCV}" # Since we are using qemu-system inside a x86_64 container, we # should set `platform` field to x86_64 and unset the hypervisor to # be passed @@ -346,13 +349,14 @@ def determine_allowlist(config_file): """Determine the what platforms should be enabled for this crate""" try: - with open(config_file, 'r') as file: + with open(config_file, "r") as file: platforms = [line.strip() for line in file.readlines()] return platforms except Exception as e: # Fall back to default platform if anything goes wrong return ["x86_64", "aarch64"] + def generate_pipeline(config_file, platform_allowlist): """Generate the pipeline yaml file from a json configuration file."""