From 60c72795dbca5443764ddddbfc6912134d7f5330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zcan?= Date: Fri, 18 Oct 2024 17:40:37 +0200 Subject: [PATCH] chors: format code using black --- src/elody/csv.py | 2 +- src/elody/exceptions.py | 2 ++ src/elody/util.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/elody/csv.py b/src/elody/csv.py index f3d6e86..3c6f272 100644 --- a/src/elody/csv.py +++ b/src/elody/csv.py @@ -210,7 +210,7 @@ def __fill_objects_from_csv(self): options = metadata_info.get("value_options") if options and value not in options: raise InvalidValueException( - f"The value \"{value}\" is invalid, these are the valid values: {options}" + f'The value "{value}" is invalid, these are the valid values: {options}' ) indexed_dict[type][id]["metadata"].append( self._get_metadata_object(metadata_key, value) diff --git a/src/elody/exceptions.py b/src/elody/exceptions.py index 6e70e31..17bca63 100644 --- a/src/elody/exceptions.py +++ b/src/elody/exceptions.py @@ -31,9 +31,11 @@ class InvalidExtensionException(Exception): class InvalidObjectException(Exception): pass + class InvalidValueException(Exception): pass + class NoMediafilesException(Exception): pass diff --git a/src/elody/util.py b/src/elody/util.py index 9a8bf24..eb52a01 100644 --- a/src/elody/util.py +++ b/src/elody/util.py @@ -230,7 +230,8 @@ def signal_entity_deleted(mq_client, entity): def signal_mediafiles_added_for_entity(mq_client, entity, mediafiles): data = {"entity": entity, "mediafiles": mediafiles} send_cloudevent(mq_client, "dams", "dams.mediafiles_added_for_entity", data) - + + def signal_relations_deleted_for_entity(mq_client, entity, relations): data = {"entity": entity, "relations": relations} send_cloudevent(mq_client, "dams", "dams.relations_deleted_for_entity", data)