From 2f283f1511279e3e65b02f8114b12a7a9c034541 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:59:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pubtools/_pulp/tasks/push/phase/upload.py | 7 +++++-- tests/fake/test_fake_persistence.py | 13 +++++++++---- tests/push/test_push_prepush.py | 6 ++++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/pubtools/_pulp/tasks/push/phase/upload.py b/pubtools/_pulp/tasks/push/phase/upload.py index 3b3cf445..8e375370 100644 --- a/pubtools/_pulp/tasks/push/phase/upload.py +++ b/pubtools/_pulp/tasks/push/phase/upload.py @@ -64,12 +64,15 @@ def run(self): if item_type not in upload_context: upload_context[item_type] = {} if item.upload_repo not in upload_context[item_type]: - upload_context[item_type][item.upload_repo] = \ + upload_context[item_type][item.upload_repo] = ( item.upload_context(self.pulp_client) + ) ctx = upload_context[item_type][item.upload_repo] else: if item_type not in upload_context: - upload_context[item_type] = item.upload_context(self.pulp_client) + upload_context[item_type] = item.upload_context( + self.pulp_client + ) ctx = upload_context[item_type] uploading += 1 self.put_future_output(item.ensure_uploaded(ctx)) diff --git a/tests/fake/test_fake_persistence.py b/tests/fake/test_fake_persistence.py index e5ed28b2..58df64b2 100644 --- a/tests/fake/test_fake_persistence.py +++ b/tests/fake/test_fake_persistence.py @@ -24,10 +24,15 @@ def test_state_persisted(tmpdir, data_path): # It should already have a few repos since there is some default # state. repo_ids = sorted([repo.id for repo in client.search_repository()]) - assert repo_ids == ["all-erratum-content-2019", "all-erratum-content-2020", - "all-iso-content", "all-rpm-content", - "all-rpm-content-54", "all-rpm-content-e8", - "redhat-maintenance"] + assert repo_ids == [ + "all-erratum-content-2019", + "all-erratum-content-2020", + "all-iso-content", + "all-rpm-content", + "all-rpm-content-54", + "all-rpm-content-e8", + "redhat-maintenance", + ] # Now add a bit more state. # We use modules here because that's one of the more complex types diff --git a/tests/push/test_push_prepush.py b/tests/push/test_push_prepush.py index 8c1f4ce9..5b3b55d5 100644 --- a/tests/push/test_push_prepush.py +++ b/tests/push/test_push_prepush.py @@ -58,8 +58,10 @@ def test_pre_push( assert units # RPMs are separated into different arc repos by checksum - expected_repo_mapping = {"test-srpm01": ["all-rpm-content-54"], - "walrus": ["all-rpm-content-e8"]} + expected_repo_mapping = { + "test-srpm01": ["all-rpm-content-54"], + "walrus": ["all-rpm-content-e8"], + } for unit in units: # The only type of content is RPMs, because that's all we support for