Skip to content

Commit 80d17a4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b0f03e1 commit 80d17a4

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

src/apkit/abc/server.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,20 @@
77

88
class AbstractApkitIntegration(ABC):
99
@abstractmethod
10-
def outbox(self, *args) -> None:
11-
...
10+
def outbox(self, *args) -> None: ...
1211

1312
@abstractmethod
14-
def inbox(self, *args) -> None:
15-
...
13+
def inbox(self, *args) -> None: ...
1614

1715
@abstractmethod
1816
def on(
1917
self, type: Union[type[Activity], type[Outbox]], func: Optional[Callable] = None
2018
) -> Any:
21-
def decorator(func: Callable) -> Callable:
22-
...
19+
def decorator(func: Callable) -> Callable: ...
2320

2421
@abstractmethod
2522
def webfinger(self, func: Optional[Callable] = None) -> Any:
26-
def decorator(func: Callable) -> Callable:
27-
...
23+
def decorator(func: Callable) -> Callable: ...
2824

2925
@abstractmethod
3026
def nodeinfo(
@@ -33,5 +29,4 @@ def nodeinfo(
3329
version: Literal["2.0", "2.1"],
3430
func: Optional[Callable] = None,
3531
) -> Any:
36-
def decorator(fn: Callable) -> Callable:
37-
...
32+
def decorator(fn: Callable) -> Callable: ...

src/apkit/abc/types.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ class AbstractContext(ABC):
1515
request: Any
1616

1717
@abstractmethod
18-
def send(self, keys: List[ActorKey], target: Actor, activity: ActivityPubModel):
19-
...
18+
def send(self, keys: List[ActorKey], target: Actor, activity: ActivityPubModel): ...
2019

2120
@abstractmethod
22-
def get_actor_keys(self, identifier: Optional[str]) -> List[ActorKey]:
23-
...
21+
def get_actor_keys(self, identifier: Optional[str]) -> List[ActorKey]: ...

src/apkit/client/_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def reconstruct_headers(
5656
if json:
5757
if isinstance(json, ActivityPubModel):
5858
if "content-type" not in processed_headers:
59-
processed_headers[
60-
"content-type"
61-
] = "application/activity+json; charset=UTF-8"
59+
processed_headers["content-type"] = (
60+
"application/activity+json; charset=UTF-8"
61+
)
6262
processed_headers["content-type_original_key"] = "Content-Type"
6363
elif isinstance(json, dict):
6464
if "content-type" not in processed_headers:

src/apkit/server/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ def __init__(
9595
Callable[[Request, WebfingerResource], Awaitable[Any]]
9696
] = None
9797
self.__ap_config = apkit_config
98-
self._get_actor_keys: Optional[
99-
Callable[[str], Awaitable[List["ActorKey"]]]
100-
] = apkit_config.actor_keys
98+
self._get_actor_keys: Optional[Callable[[str], Awaitable[List["ActorKey"]]]] = (
99+
apkit_config.actor_keys
100+
)
101101
self.__ap_config = apkit_config
102102

103103
super().__init__(

0 commit comments

Comments
 (0)