diff libervia/frontends/quick_frontend/quick_blog.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 26b7ed2817da
children
line wrap: on
line diff
--- a/libervia/frontends/quick_frontend/quick_blog.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/frontends/quick_frontend/quick_blog.py	Wed Jun 19 18:44:57 2024 +0200
@@ -53,7 +53,7 @@
         self.title = data.get("title")
         self.title_rich = None
         self.title_xhtml = data.get("title_xhtml")
-        self.tags = data.get('tags', [])
+        self.tags = data.get("tags", [])
         self.content = data.get("content")
         self.content_rich = None
         self.content_xhtml = data.get("content_xhtml")
@@ -145,8 +145,16 @@
         for item, comments in items:
             self.add_entry(item, comments, service=service, node=node, with_update=False)
 
-    def add_entry(self, item=None, comments=None, service=None, node=None,
-                 with_update=True, editable=False, edit_entry=False):
+    def add_entry(
+        self,
+        item=None,
+        comments=None,
+        service=None,
+        node=None,
+        with_update=True,
+        editable=False,
+        edit_entry=False,
+    ):
         """Add a microblog entry
 
         @param editable (bool): True if the entry can be modified
@@ -275,7 +283,7 @@
                 if value is not None:
                     mb_data[name] = value
 
-        mb_data['tags'] = self.item.tags
+        mb_data["tags"] = self.item.tags
 
         if self.blog.new_message_target not in (C.PUBLIC, C.GROUP):
             raise NotImplementedError
@@ -284,7 +292,7 @@
             mb_data["allow_comments"] = True
 
         if self.blog.new_message_target == C.GROUP:
-            mb_data['groups'] = list(self.blog.targets)
+            mb_data["groups"] = list(self.blog.targets)
 
         self.blog.host.bridge.mb_send(
             str(self.service or ""),
@@ -391,10 +399,13 @@
             for item_data in items_data:
                 item_data[0] = data_format.deserialise(item_data[0])
                 for item_metadata in item_data[1]:
-                    item_metadata[3] = [data_format.deserialise(i) for i in item_metadata[3]]
+                    item_metadata[3] = [
+                        data_format.deserialise(i) for i in item_metadata[3]
+                    ]
             if not failure:
-                self._add_mb_items_with_comments((items_data, metadata),
-                                             service=jid.JID(service))
+                self._add_mb_items_with_comments(
+                    (items_data, metadata), service=jid.JID(service)
+                )
 
         self.update()
         if remaining: