Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 10, 2025
1 parent 9c37f55 commit c6350a3
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 18 deletions.
3 changes: 1 addition & 2 deletions convert2rhel/actions/conversion/set_efi_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@ def run(self):

if not grub.is_efi():
logger.info(
"Unable to collect data about UEFI on a BIOS system, did not perform UEFI bootloader "
"entry replacement."
"Unable to collect data about UEFI on a BIOS system, did not perform UEFI bootloader entry replacement."
)
return

Expand Down
3 changes: 1 addition & 2 deletions convert2rhel/actions/post_conversion/hostmetering.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ def run(self):
level="WARNING",
id="CONFIGURE_HOST_METERING_FAILURE",
title="Failed to enable and start host metering service.",
description="The host metering service failed to start"
" successfully and won't be able to keep track.",
description="The host metering service failed to start successfully and won't be able to keep track.",
diagnosis="Command {command} failed with {error_message}".format(
command=command, error_message=error_message
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def run(self):
level="INFO",
id="FOUND_MODIFIED_RPM_FILES",
title="Modified rpm files from before and after the conversion were found.",
description="Comparison of modified rpm files from before and after " "the conversion: \n{}".format(
description="Comparison of modified rpm files from before and after the conversion: \n{}".format(
modified_rpm_files_diff
),
)
3 changes: 1 addition & 2 deletions convert2rhel/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ def _register_options(self):
self._shared_options_parser.add_argument(
"--els",
action="store_true",
help="Explicitly recognize the system as els, utilizing els repos."
" This option is meant for el7 systems.",
help="Explicitly recognize the system as els, utilizing els repos. This option is meant for el7 systems.",
)
self._shared_options_parser.add_argument(
"--enablerepo",
Expand Down
2 changes: 1 addition & 1 deletion convert2rhel/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,5 @@ def write_temporary_repofile(contents):
raise exceptions.CriticalError(
id_="STORE_REPOFILE_FAILED",
title="Failed to store a repository file",
description="Failed to write a repository file contents to {}.\n" "Reason: {}".format(f.name, str(err)),
description="Failed to write a repository file contents to {}.\nReason: {}".format(f.name, str(err)),
)
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,6 @@ def test_update_grub_error(update_grub_instance, monkeypatch, get_partition_erro
level="ERROR",
id="FAILED_TO_IDENTIFY_GRUB2_BLOCK_DEVICE",
title="Failed to identify GRUB2 block device",
description="The block device could not be identified, please look at the diagnosis " "for more information.",
description="The block device could not be identified, please look at the diagnosis for more information.",
diagnosis=diagnosis,
)
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_ensure_compatibility_of_kmods(
),
(
HOST_MODULES_STUB_BAD,
"kernel-core-0:4.18.0-240.10.1.el8_3.x86_64\n" "kernel-core-0:4.19.0-240.10.1.el8_3.i486\n",
"kernel-core-0:4.18.0-240.10.1.el8_3.x86_64\nkernel-core-0:4.19.0-240.10.1.el8_3.i486\n",
("", 0),
"CANNOT_COMPARE_PACKAGE_VERSIONS",
"ERROR",
Expand Down
3 changes: 1 addition & 2 deletions convert2rhel/unit_tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ def test_serverurl_with_no_rhsm_credentials(self, caplog, monkeypatch):
cli.CLI()

message = (
"Ignoring the --serverurl option. It has no effect when no credentials to"
" subscribe the system were given."
"Ignoring the --serverurl option. It has no effect when no credentials to subscribe the system were given."
)
assert message in caplog.text

Expand Down
4 changes: 1 addition & 3 deletions convert2rhel/unit_tests/subscription_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,9 +802,7 @@ def test_registration_succeeds_but_dbus_returns_noreply(self, monkeypatch, mocke
utils,
"run_subprocess",
RunSubprocessMocked(
return_string=(
"system identity: 1234-56-78-9abc\n" "name: abc-123\n" "org name: Test\n" "org ID: 12345678910\n"
)
return_string=("system identity: 1234-56-78-9abc\nname: abc-123\norg name: Test\norg ID: 12345678910\n")
),
)

Expand Down
6 changes: 3 additions & 3 deletions tests/integration/test_helpers/satellite.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def get_satellite_curl_command(self):
return self._sat_reg_commands.get(self.key)

def _curl_the_satellite_script(self, curl_command):
assert (
self.shell(f"{curl_command} -o {self._sat_script_location}", silent=True).returncode == 0
), "Failed to curl the satellite script to the machine."
assert self.shell(f"{curl_command} -o {self._sat_script_location}", silent=True).returncode == 0, (
"Failed to curl the satellite script to the machine."
)

# [danmyway] This is just a mitigation of rhn-client-tools pkg obsoleting subscription-manager during upgrade
# TODO remove when https://github.com/theforeman/foreman/pull/10280 gets merged and or foreman 3.12 is out
Expand Down

0 comments on commit c6350a3

Please sign in to comment.