From 36ae86fe6a9bf740b25c4ecd322362da7660d39f Mon Sep 17 00:00:00 2001 From: SouthFox Date: Fri, 4 Aug 2023 22:16:29 +0800 Subject: [PATCH] [chore] format code --- app/activitypub.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/activitypub.py b/app/activitypub.py index 4121ff7..1ac0d15 100644 --- a/app/activitypub.py +++ b/app/activitypub.py @@ -112,9 +112,7 @@ class VisibilityEnum(str, enum.Enum): DIRECT = "direct" -def handle_visibility( - ap_object: dict -) -> VisibilityEnum: +def handle_visibility(ap_object: dict) -> VisibilityEnum: to = ap_object.get("to", []) cc = ap_object.get("cc", []) if AS_PUBLIC in to: @@ -146,9 +144,9 @@ def wrap_ap_object(ap_object: dict) -> dict: async def post( - url: str, - payload : dict, -) -> httpx.Response : + url: str, + payload: dict, +) -> httpx.Response: logger.info(f"send post, {payload=}") async with httpx.AsyncClient() as client: @@ -167,7 +165,7 @@ async def post( async def fetch( - url: str, + url: str, ) -> dict: logger.info(f"fetch {url}")