diff libervia/backend/plugins/plugin_xep_0422.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 4b842c1fb686
children
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0422.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/plugins/plugin_xep_0422.py	Wed Jun 19 18:44:57 2024 +0200
@@ -72,7 +72,7 @@
         clear: Optional[bool] = None,
         shell: Optional[bool] = None,
         children: Optional[List[domish.Element]] = None,
-        external: Optional[List[Union[str, Tuple[str, str]]]] = None
+        external: Optional[List[Union[str, Tuple[str, str]]]] = None,
     ) -> domish.Element:
         """Generate, add and return <apply-to> element
 
@@ -112,9 +112,7 @@
 
     @async_lru(maxsize=5)
     async def get_fastened_elts(
-        self,
-        client: SatXMPPEntity,
-        message_elt: domish.Element
+        self, client: SatXMPPEntity, message_elt: domish.Element
     ) -> Optional[FastenMetadata]:
         """Get fastened elements
 
@@ -127,9 +125,7 @@
         else:
             origin_id = apply_to_elt.getAttribute("id")
             if not origin_id:
-                log.warning(
-                    f"Received invalid fastening message: {message_elt.toXml()}"
-                )
+                log.warning(f"Received invalid fastening message: {message_elt.toXml()}")
                 return None
             elements = apply_to_elt.children
             if not elements:
@@ -140,7 +136,7 @@
                 History,
                 History.origin_id,
                 origin_id,
-                (History.messages, History.subjects, History.thread)
+                (History.messages, History.subjects, History.thread),
             )
             return FastenMetadata(
                 elements,