diff libervia/cli/output_std.py @ 4270:0d7bb4df2343

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 47401850dec6
children
line wrap: on
line diff
--- a/libervia/cli/output_std.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/cli/output_std.py	Wed Jun 19 18:44:57 2024 +0200
@@ -79,10 +79,12 @@
     def messages(self, data):
         # TODO: handle lang, and non chat message (normal, headline)
         for mess_data in data:
-            (uid, timestamp, from_jid, to_jid, message, subject, mess_type,
-             extra) = mess_data
-            time_str = date_utils.date_fmt(timestamp, "auto_day",
-                                           tz_info=date_utils.TZ_LOCAL)
+            (uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra) = (
+                mess_data
+            )
+            time_str = date_utils.date_fmt(
+                timestamp, "auto_day", tz_info=date_utils.TZ_LOCAL
+            )
             from_jid = jid.JID(from_jid)
             if mess_type == C.MESS_TYPE_GROUPCHAT:
                 nick = from_jid.resource
@@ -95,10 +97,19 @@
                 nick_color = A.BOLD + A.FG_YELLOW
             message = list(message.values())[0] if message else ""
 
-            self.host.disp(A.color(
-                A.FG_CYAN, '['+time_str+'] ',
-                nick_color, nick, A.RESET, A.BOLD, '> ',
-                A.RESET, message))
+            self.host.disp(
+                A.color(
+                    A.FG_CYAN,
+                    "[" + time_str + "] ",
+                    nick_color,
+                    nick,
+                    A.RESET,
+                    A.BOLD,
+                    "> ",
+                    A.RESET,
+                    message,
+                )
+            )
 
 
 class Json(object):