diff --git a/pungi/runroot.py b/pungi/runroot.py index e545ac20..9efab6f3 100644 --- a/pungi/runroot.py +++ b/pungi/runroot.py @@ -236,9 +236,9 @@ class Runroot(kobo.log.LoggingBase): fmt_dict["runroot_key"] = runroot_key self._ssh_run(hostname, user, run_template, fmt_dict, log_file=log_file) - fmt_dict[ - "command" - ] = "rpm -qa --qf='%{name}-%{version}-%{release}.%{arch}\n'" + fmt_dict["command"] = ( + "rpm -qa --qf='%{name}-%{version}-%{release}.%{arch}\n'" + ) buildroot_rpms = self._ssh_run( hostname, user, diff --git a/pungi/scripts/pungi.py b/pungi/scripts/pungi.py index 48629813..4609fa75 100644 --- a/pungi/scripts/pungi.py +++ b/pungi/scripts/pungi.py @@ -478,8 +478,7 @@ def main(): print("RPM size: %s MiB" % (mypungi.size_packages() / 1024**2)) if not opts.nodebuginfo: print( - "DEBUGINFO size: %s MiB" - % (mypungi.size_debuginfo() / 1024**2) + "DEBUGINFO size: %s MiB" % (mypungi.size_debuginfo() / 1024**2) ) if not opts.nosource: print("SRPM size: %s MiB" % (mypungi.size_srpms() / 1024**2)) diff --git a/tests/test_extra_isos_phase.py b/tests/test_extra_isos_phase.py index fab8aee6..50cfa6c9 100644 --- a/tests/test_extra_isos_phase.py +++ b/tests/test_extra_isos_phase.py @@ -863,10 +863,8 @@ class GetIsoContentsTest(helpers.PungiTestCase): "images/efiboot.img": os.path.join(iso_dir, "images/efiboot.img"), } - ggp.side_effect = ( - lambda compose, x: gp[x[0][len(self.topdir) + 1 :]] - if len(x) == 1 - else bi_gp + ggp.side_effect = lambda compose, x: ( + gp[x[0][len(self.topdir) + 1 :]] if len(x) == 1 else bi_gp ) gp_file = os.path.join(self.topdir, "work/x86_64/iso/my.iso-graft-points") diff --git a/tests/test_gather_phase.py b/tests/test_gather_phase.py index a5d59730..c5a33a7e 100644 --- a/tests/test_gather_phase.py +++ b/tests/test_gather_phase.py @@ -1057,10 +1057,8 @@ class TestGatherPackages(helpers.PungiTestCase): @mock.patch("pungi.phases.gather.get_gather_method") def test_hybrid_method(self, get_gather_method, get_variant_packages): packages, groups, filters = mock.Mock(), mock.Mock(), mock.Mock() - get_variant_packages.side_effect = ( - lambda c, v, a, s, p: (packages, groups, filters) - if s == "comps" - else (None, None, None) + get_variant_packages.side_effect = lambda c, v, a, s, p: ( + (packages, groups, filters) if s == "comps" else (None, None, None) ) get_gather_method.return_value.return_value.return_value = { "rpm": [], diff --git a/tests/test_runroot.py b/tests/test_runroot.py index 4b3f0488..d2b7e014 100644 --- a/tests/test_runroot.py +++ b/tests/test_runroot.py @@ -82,12 +82,12 @@ class TestRunrootOpenSSH(helpers.PungiTestCase): @mock.patch("pungi.runroot.run") def test_run_templates(self, run): - self.compose.conf[ - "runroot_ssh_init_template" - ] = "/usr/sbin/init_runroot {runroot_tag}" - self.compose.conf[ - "runroot_ssh_install_packages_template" - ] = "install {runroot_key} {packages}" + self.compose.conf["runroot_ssh_init_template"] = ( + "/usr/sbin/init_runroot {runroot_tag}" + ) + self.compose.conf["runroot_ssh_install_packages_template"] = ( + "install {runroot_key} {packages}" + ) self.compose.conf["runroot_ssh_run_template"] = "run {runroot_key} {command}" run.return_value = (0, "key\n") @@ -111,9 +111,9 @@ class TestRunrootOpenSSH(helpers.PungiTestCase): @mock.patch("pungi.runroot.run") def test_run_templates_no_init(self, run): - self.compose.conf[ - "runroot_ssh_install_packages_template" - ] = "install {packages}" + self.compose.conf["runroot_ssh_install_packages_template"] = ( + "install {packages}" + ) self.compose.conf["runroot_ssh_run_template"] = "run {command}" run.return_value = (0, "key\n") @@ -136,9 +136,9 @@ class TestRunrootOpenSSH(helpers.PungiTestCase): @mock.patch("pungi.runroot.run") def test_run_templates_no_packages(self, run): - self.compose.conf[ - "runroot_ssh_install_packages_template" - ] = "install {packages}" + self.compose.conf["runroot_ssh_install_packages_template"] = ( + "install {packages}" + ) self.compose.conf["runroot_ssh_run_template"] = "run {command}" run.return_value = (0, "key\n")