Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ minimum_pre_commit_version: "2.9.0"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.3
rev: v0.14.7
hooks:
# Run the linter.
- id: ruff
Expand All @@ -11,7 +11,7 @@ repos:
- id: ruff-format

- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v5.0.0"
rev: "v6.0.0"
hooks:
- id: "end-of-file-fixer"
- id: "trailing-whitespace"
Expand All @@ -23,25 +23,25 @@ repos:
hooks:
- id: "check-json5"
- repo: "https://github.com/teemtee/tmt.git"
rev: "1.38.0"
rev: "1.62.1"
hooks:
- id: "tmt-tests-lint"
verbose: false
files: ^(tests/|plans/)

- repo: https://github.com/packit/pre-commit-hooks
rev: v1.2.0
rev: v1.3.0
hooks:
- id: check-rebase
args:
- https://github.com/oamg/convert2rhel.git
stages: [manual, pre-push]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
rev: v8.30.0
hooks:
- id: gitleaks
stages: [manual, pre-push]
- repo: https://github.com/jendrikseipp/vulture
rev: v2.13
rev: v2.14
hooks:
- id: vulture
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
),
)
2 changes: 1 addition & 1 deletion convert2rhel/actions/pre_ponr_changes/handle_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def run(self):
" conversion. This list includes packages that are known to cause a conversion failure."
),
remediations=(
"Remove the packages manually before running convert2rhel again:\n" "yum remove -y {}".format(
"Remove the packages manually before running convert2rhel again:\nyum remove -y {}".format(
" ".join(pkgs_not_removed)
)
),
Expand Down
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
Loading