apply black to the whole codebase.

This commit is contained in:
Goffi 2026-03-09 09:22:04 +01:00
commit 82e2c6efac

View file

@ -49,7 +49,6 @@ from libervia.backend.tools import xml_tools
from libervia.backend.tools.common import uri as xmpp_uri
from libervia.backend.tools.utils import xmpp_date
TEST_BASE_URL = "https://example.org"
TEST_USER = "test_user"
TEST_AP_ACCOUNT = f"{TEST_USER}@example.org"
@ -1360,8 +1359,7 @@ class TestActivityPubGateway:
node=ap_gateway._m.namespace,
item=ap_item["id"],
)
item_elt = xml_tools.parse(
f"""
item_elt = xml_tools.parse(f"""
<item id="123" publisher="{TEST_JID}/res.123">
<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text">test message 1</title>
@ -1380,8 +1378,7 @@ class TestActivityPubGateway:
<link href="{ap_item_url}" rel="via"/>
</entry>
</item>
"""
)
""")
item_elt.uri = pubsub.NS_PUBSUB_EVENT
with patch.object(ap_gateway, "ap_post") as ap_post:
@ -1473,15 +1470,13 @@ class TestActivityPubGateway:
attachment_node = ap_gateway._pa.get_attachment_node_name(
recipient_jid, ap_gateway._m.namespace, ap_item["id"]
)
item_elt = xml_tools.parse(
f"""
item_elt = xml_tools.parse(f"""
<item id="{TEST_JID.userhost()}" published="{TEST_JID.userhostJID()}">
<attachments xmlns="urn:xmpp:pubsub-attachments:1">
<noticed timestamp="2022-07-22T12:29:45Z"/>
</attachments>
</item>
"""
)
""")
item_elt.uri = pubsub.NS_PUBSUB_EVENT
items_event = pubsub.ItemsEvent(
TEST_JID, recipient_jid, attachment_node, [item_elt], {}
@ -1565,8 +1560,7 @@ class TestActivityPubGateway:
recipient_jid, ap_gateway._m.namespace, ap_item["id"]
)
reactions = ["🦁", "🥜", "🎻"]
item_elt = xml_tools.parse(
f"""
item_elt = xml_tools.parse(f"""
<item id="{TEST_JID.userhost()}" published="{TEST_JID.userhostJID()}">
<attachments xmlns="urn:xmpp:pubsub-attachments:1">
<reactions timestamp="2022-08-31T12:17:23Z">
@ -1576,8 +1570,7 @@ class TestActivityPubGateway:
</reactions>
</attachments>
</item>
"""
)
""")
item_elt.uri = pubsub.NS_PUBSUB_EVENT
items_event = pubsub.ItemsEvent(
TEST_JID, recipient_jid, attachment_node, [item_elt], {}