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

Reformatted code base using black.
author Goffi <goffi@goffi.org>
date Wed, 19 Jun 2024 18:44:57 +0200
parents 7067b0d73183
children
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_comp_ap_gateway/constants.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/plugins/plugin_comp_ap_gateway/constants.py	Wed Jun 19 18:44:57 2024 +0200
@@ -55,32 +55,71 @@
         ("digest", "(request-target)"),
     ],
     b"GET": ["host"],
-    b"POST": ["digest"]
+    b"POST": ["digest"],
 }
 PAGE_SIZE = 10
 HS2019 = "hs2019"
 # delay after which a signed request is not accepted anymore
-SIGN_EXP = 12*60*60  # 12 hours (same value as for Mastodon)
+SIGN_EXP = 12 * 60 * 60  # 12 hours (same value as for Mastodon)
 
 LRU_MAX_SIZE = 200
 ACTIVITY_TYPES = (
-    "Accept", "Add", "Announce", "Arrive", "Block", "Create", "Delete", "Dislike", "Flag",
-    "Follow", "Ignore", "Invite", "Join", "Leave", "Like", "Listen", "Move", "Offer",
-    "Question", "Reject", "Read", "Remove", "TentativeReject", "TentativeAccept",
-    "Travel", "Undo", "Update", "View",
+    "Accept",
+    "Add",
+    "Announce",
+    "Arrive",
+    "Block",
+    "Create",
+    "Delete",
+    "Dislike",
+    "Flag",
+    "Follow",
+    "Ignore",
+    "Invite",
+    "Join",
+    "Leave",
+    "Like",
+    "Listen",
+    "Move",
+    "Offer",
+    "Question",
+    "Reject",
+    "Read",
+    "Remove",
+    "TentativeReject",
+    "TentativeAccept",
+    "Travel",
+    "Undo",
+    "Update",
+    "View",
     # non-standard activities
-    "EmojiReact"
+    "EmojiReact",
 )
 ACTIVITY_TYPES_LOWER = [a.lower() for a in ACTIVITY_TYPES]
 ACTIVITY_OBJECT_MANDATORY = (
-    "Create", "Update", "Delete", "Follow", "Add", "Remove", "Like", "Block", "Undo"
+    "Create",
+    "Update",
+    "Delete",
+    "Follow",
+    "Add",
+    "Remove",
+    "Like",
+    "Block",
+    "Undo",
 )
 ACTIVITY_TARGET_MANDATORY = ("Add", "Remove")
 # activities which can be used with Shared Inbox (i.e. with no account specified)
 # must be lowercase
 ACTIVIY_NO_ACCOUNT_ALLOWED = (
-    "create", "update", "delete", "announce", "undo", "like", "emojireact", "join",
-    "leave"
+    "create",
+    "update",
+    "delete",
+    "announce",
+    "undo",
+    "like",
+    "emojireact",
+    "join",
+    "leave",
 )
 # maximum number of parents to retrieve when comments_max_depth option is set
 COMMENTS_MAX_PARENTS = 100