From e2fee80ff4d0482c57580364e3b75c3a38bd48e8 Mon Sep 17 00:00:00 2001 From: Antoine Lambert <anlambert@softwareheritage.org> Date: Fri, 30 Aug 2024 17:20:34 +0200 Subject: [PATCH] Fix some formatting after black version bump --- swh/loader/core/metadata_fetchers.py | 9 +++------ swh/loader/core/nar.py | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/swh/loader/core/metadata_fetchers.py b/swh/loader/core/metadata_fetchers.py index fa1d0d5c..edf47a0c 100644 --- a/swh/loader/core/metadata_fetchers.py +++ b/swh/loader/core/metadata_fetchers.py @@ -28,14 +28,11 @@ class MetadataFetcherProtocol(Protocol): credentials: CredentialsType, lister_name: str, lister_instance_name: str, - ): - ... + ): ... - def get_origin_metadata(self) -> List[RawExtrinsicMetadata]: - ... + def get_origin_metadata(self) -> List[RawExtrinsicMetadata]: ... - def get_parent_origins(self) -> List[Origin]: - ... + def get_parent_origins(self) -> List[Origin]: ... @functools.lru_cache() diff --git a/swh/loader/core/nar.py b/swh/loader/core/nar.py index 1cdf97a9..451e3af5 100644 --- a/swh/loader/core/nar.py +++ b/swh/loader/core/nar.py @@ -103,9 +103,9 @@ class Nar: ): self.hash_names = hash_names self.updater = { - hash_name: hashlib.sha256() - if hash_name.lower() == "sha256" - else hashlib.sha1() + hash_name: ( + hashlib.sha256() if hash_name.lower() == "sha256" else hashlib.sha1() + ) for hash_name in hash_names } format_output = format_output.lower() -- GitLab