]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/build-with-container: apply black formatting to file
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 20 Feb 2025 00:21:27 +0000 (19:21 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 6 Mar 2025 21:14:27 +0000 (16:14 -0500)
After the last set of fixes and enhancements I forgot to reformat the
file. This applies standard `black` formatting to the file.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit de855aec1c7a483ca5f0971a149860e8aaee8f7f)

src/script/build-with-container.py

index 65cf3a920ec467c07781b2ba9e12ad8c0f4206c7..08e98833ae9904c06cf9b7d9aa6d7081e57553da 100755 (executable)
@@ -84,6 +84,7 @@ log = logging.getLogger()
 try:
     from enum import StrEnum
 except ImportError:
+
     class StrEnum(str, enum.Enum):
         def __str__(self):
             return self.value
@@ -93,7 +94,7 @@ class DistroKind(StrEnum):
     CENTOS10 = "centos10"
     CENTOS8 = "centos8"
     CENTOS9 = "centos9"
-    FEDORA41 = 'fedora41'
+    FEDORA41 = "fedora41"
     UBUNTU2204 = "ubuntu22.04"
     UBUNTU2404 = "ubuntu24.04"
 
@@ -106,7 +107,7 @@ class DefaultImage(StrEnum):
     CENTOS10 = "quay.io/centos/centos:stream10"
     CENTOS8 = "quay.io/centos/centos:stream8"
     CENTOS9 = "quay.io/centos/centos:stream9"
-    FEDORA41 = 'registry.fedoraproject.org/fedora:41'
+    FEDORA41 = "registry.fedoraproject.org/fedora:41"
     UBUNTU2204 = "docker.io/ubuntu:22.04"
     UBUNTU2404 = "docker.io/ubuntu:24.04"
 
@@ -161,9 +162,9 @@ def _container_cmd(ctx, args, *, workdir=None, interactive=False):
         cmd.append(f"-eBUILD_DIR={ctx.cli.build_dir}")
     if ctx.cli.ccache_dir:
         ccdir = str(ctx.cli.ccache_dir).format(
-            homedir=ctx.cli.homedir or '',
-            build_dir=ctx.cli.build_dir or '',
-            distro=ctx.cli.distro or '',
+            homedir=ctx.cli.homedir or "",
+            build_dir=ctx.cli.build_dir or "",
+            distro=ctx.cli.distro or "",
         )
         cmd.append(f"-eCCACHE_DIR={ccdir}")
         cmd.append(f"-eCCACHE_BASEDIR={ctx.cli.homedir}")
@@ -282,7 +283,9 @@ class Context:
     @property
     def dnf_cache_dir(self):
         if self.cli.dnf_cache_path and self.distro_cache_name:
-            path = pathlib.Path(self.cli.dnf_cache_path)/ self.distro_cache_name
+            path = (
+                pathlib.Path(self.cli.dnf_cache_path) / self.distro_cache_name
+            )
             path = path.expanduser()
             return path.resolve()
         return None