diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 848cb8c..7ec3b85 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: - python - pyi repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 + rev: v0.14.11 - hooks: - additional_dependencies: - aiohttp>=3.12.15 @@ -75,4 +75,4 @@ repos: name: Pyrefly (type checking) pass_filenames: false repo: https://github.com/facebook/pyrefly-pre-commit - rev: 0.46.0 + rev: 0.47.0 diff --git a/src/apkit/abc/server.py b/src/apkit/abc/server.py index be55909..553d771 100644 --- a/src/apkit/abc/server.py +++ b/src/apkit/abc/server.py @@ -7,24 +7,20 @@ class AbstractApkitIntegration(ABC): @abstractmethod - def outbox(self, *args) -> None: - ... + def outbox(self, *args) -> None: ... @abstractmethod - def inbox(self, *args) -> None: - ... + def inbox(self, *args) -> None: ... @abstractmethod def on( self, type: Union[type[Activity], type[Outbox]], func: Optional[Callable] = None ) -> Any: - def decorator(func: Callable) -> Callable: - ... + def decorator(func: Callable) -> Callable: ... @abstractmethod def webfinger(self, func: Optional[Callable] = None) -> Any: - def decorator(func: Callable) -> Callable: - ... + def decorator(func: Callable) -> Callable: ... @abstractmethod def nodeinfo( @@ -33,5 +29,4 @@ def nodeinfo( version: Literal["2.0", "2.1"], func: Optional[Callable] = None, ) -> Any: - def decorator(fn: Callable) -> Callable: - ... + def decorator(fn: Callable) -> Callable: ... diff --git a/src/apkit/abc/types.py b/src/apkit/abc/types.py index 3e5b8a1..d9f114d 100644 --- a/src/apkit/abc/types.py +++ b/src/apkit/abc/types.py @@ -15,9 +15,7 @@ class AbstractContext(ABC): request: Any @abstractmethod - def send(self, keys: List[ActorKey], target: Actor, activity: ActivityPubModel): - ... + def send(self, keys: List[ActorKey], target: Actor, activity: ActivityPubModel): ... @abstractmethod - def get_actor_keys(self, identifier: Optional[str]) -> List[ActorKey]: - ... + def get_actor_keys(self, identifier: Optional[str]) -> List[ActorKey]: ... diff --git a/src/apkit/client/_common.py b/src/apkit/client/_common.py index a3894d4..88cd344 100644 --- a/src/apkit/client/_common.py +++ b/src/apkit/client/_common.py @@ -56,9 +56,9 @@ def reconstruct_headers( if json: if isinstance(json, ActivityPubModel): if "content-type" not in processed_headers: - processed_headers[ - "content-type" - ] = "application/activity+json; charset=UTF-8" + processed_headers["content-type"] = ( + "application/activity+json; charset=UTF-8" + ) processed_headers["content-type_original_key"] = "Content-Type" elif isinstance(json, dict): if "content-type" not in processed_headers: diff --git a/src/apkit/server/app.py b/src/apkit/server/app.py index 5d806e7..79b29e8 100644 --- a/src/apkit/server/app.py +++ b/src/apkit/server/app.py @@ -95,9 +95,9 @@ def __init__( Callable[[Request, WebfingerResource], Awaitable[Any]] ] = None self.__ap_config = apkit_config - self._get_actor_keys: Optional[ - Callable[[str], Awaitable[List["ActorKey"]]] - ] = apkit_config.actor_keys + self._get_actor_keys: Optional[Callable[[str], Awaitable[List["ActorKey"]]]] = ( + apkit_config.actor_keys + ) self.__ap_config = apkit_config super().__init__(