From c65d4b6d4df436bcd5c8a872bc8d84542a3820a5 Mon Sep 17 00:00:00 2001 From: Andreas Eknes Lie Date: Fri, 10 Jan 2025 09:48:56 +0100 Subject: [PATCH] Ruff formatting adjustments --- komodo/check_up_to_date_pypi.py | 4 +--- komodo/cli.py | 2 +- komodo/yaml_file_types.py | 6 +++--- tests/test_switch.py | 6 +++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/komodo/check_up_to_date_pypi.py b/komodo/check_up_to_date_pypi.py index db22d7660..6ca5de0ef 100644 --- a/komodo/check_up_to_date_pypi.py +++ b/komodo/check_up_to_date_pypi.py @@ -182,9 +182,7 @@ def run_check_up_to_date( release_file, repository_file, python_version=( - f"{sys.version_info.major}." - f"{sys.version_info.minor}." - f"{sys.version_info.micro}" + f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" ), propose_upgrade=False, ignore=None, diff --git a/komodo/cli.py b/komodo/cli.py index e47e836bf..1ed34c3f3 100755 --- a/komodo/cli.py +++ b/komodo/cli.py @@ -232,7 +232,7 @@ def rsync_komodo_to_destination(release_name: str, destination: str) -> None: def move_old_release_from_release_path_if_exists(release_path: Path) -> None: if release_path.exists(): - shell(f"mv {str(release_path)} " f"{str(release_path)}.delete-{uuid.uuid4()}") + shell(f"mv {str(release_path)} {str(release_path)}.delete-{uuid.uuid4()}") def move_new_release_to_release_path(args: KomodoNamespace, release_path: Path) -> None: diff --git a/komodo/yaml_file_types.py b/komodo/yaml_file_types.py index 68746e71a..4450d925c 100644 --- a/komodo/yaml_file_types.py +++ b/komodo/yaml_file_types.py @@ -368,9 +368,9 @@ def from_yaml_string(self, value): return self def validate_upgrade_key(self, upgrade_key: str) -> None: - assert ( - upgrade_key in self.content - ), f"No section for this release ({upgrade_key}) in upgrade_proposals.yml" + assert upgrade_key in self.content, ( + f"No section for this release ({upgrade_key}) in upgrade_proposals.yml" + ) @staticmethod def validate_upgrade_proposals_file(upgrade_proposals_file_content: dict) -> None: diff --git a/tests/test_switch.py b/tests/test_switch.py index 57f531900..c1e9599f9 100644 --- a/tests/test_switch.py +++ b/tests/test_switch.py @@ -19,10 +19,10 @@ def test_write_activator_switches(tmpdir): == f""" if [[ $(uname -r) == *el7* ]] ; then # Get the full path of the sourced script - { bash_source_script_path } + {bash_source_script_path} if [[ $script_path == *deprecated-rhel7* ]] ; then - export KOMODO_ROOT={ prefix } - KOMODO_RELEASE_REAL={ expected_release } + export KOMODO_ROOT={prefix} + KOMODO_RELEASE_REAL={expected_release} source $KOMODO_ROOT/$KOMODO_RELEASE_REAL-rhel7/enable export PS1="(${{KOMODO_RELEASE_REAL}}) ${{_PRE_KOMODO_PS1}}"