Mercurial > libervia-backend
diff libervia/backend/core/core_types.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | c38c33a44171 |
children | 96fdf4891747 |
line wrap: on
line diff
--- a/libervia/backend/core/core_types.py Tue Jun 18 12:06:45 2024 +0200 +++ b/libervia/backend/core/core_types.py Wed Jun 19 18:44:57 2024 +0200 @@ -34,11 +34,10 @@ server_jid: t_jid.JID IQ: Callable[[Optional[str], Optional[int]], xmlstream.IQ] -EncryptionPlugin = namedtuple("EncryptionPlugin", ("instance", - "name", - "namespace", - "priority", - "directed")) + +EncryptionPlugin = namedtuple( + "EncryptionPlugin", ("instance", "name", "namespace", "priority", "directed") +) class EncryptionSession(TypedDict): @@ -47,21 +46,23 @@ # Incomplete types built through observation rather than code inspection. MessageDataExtra = TypedDict( - "MessageDataExtra", - { "encrypted": bool, "origin_id": str }, - total=False + "MessageDataExtra", {"encrypted": bool, "origin_id": str}, total=False ) -MessageData = TypedDict("MessageData", { - "from": t_jid.JID, - "to": t_jid.JID, - "uid": str, - "message": Dict[str, str], - "subject": Dict[str, str], - "type": str, - "timestamp": float, - "extra": MessageDataExtra, - "ENCRYPTION": EncryptionSession, - "xml": domish.Element -}, total=False) +MessageData = TypedDict( + "MessageData", + { + "from": t_jid.JID, + "to": t_jid.JID, + "uid": str, + "message": Dict[str, str], + "subject": Dict[str, str], + "type": str, + "timestamp": float, + "extra": MessageDataExtra, + "ENCRYPTION": EncryptionSession, + "xml": domish.Element, + }, + total=False, +)