Skip to content

Commit

Permalink
misc: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Feb 21, 2025
1 parent 00d5be9 commit 11ae860
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/plumpy/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def play_process(self, pid: 'PID_TYPE') -> ProcessResult:
...

def play_all(self) -> None:
"""Play all processes that are subscribed to the same coordinator
"""
"""Play all processes that are subscribed to the same coordinator"""

def kill_process(self, pid: 'PID_TYPE', msg_text: str | None = None) -> Any:
"""Kill the process
Expand Down
8 changes: 6 additions & 2 deletions src/plumpy/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Callable, Hashable, Protocol
from re import Pattern
from typing import TYPE_CHECKING, Any, Callable, Hashable, Protocol

if TYPE_CHECKING:
ID_TYPE = Hashable
Expand Down Expand Up @@ -36,7 +36,11 @@ def unhook_broadcast_receiver(self, identifier: 'ID_TYPE | None') -> None: ...

def unhook_task_receiver(self, identifier: 'ID_TYPE') -> None: ...

def rpc_send(self, recipient_id: Hashable, msg: Any,) -> Any: ...
def rpc_send(
self,
recipient_id: Hashable,
msg: Any,
) -> Any: ...

def broadcast_send(
self,
Expand Down
1 change: 0 additions & 1 deletion src/plumpy/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import logging
from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Union, cast

from plumpy.coordinator import Coordinator
from plumpy.exceptions import PersistenceError, TaskRejectedError

from . import loaders, persistence
Expand Down
2 changes: 0 additions & 2 deletions src/plumpy/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
cast,
)

import kiwipy

from plumpy.broadcast_filter import BroadcastFilter
from plumpy.coordinator import Coordinator

Expand Down
4 changes: 3 additions & 1 deletion src/plumpy/rmq/communications.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def converted(communicator: kiwipy.Communicator, *args: Any, **kwargs: Any) -> k
CommT = TypeVar('CommT', bound=kiwipy.Communicator)


def wrap_communicator(communicator: CommT, loop: Optional[asyncio.AbstractEventLoop] = None) -> 'LoopCommunicator[CommT]':
def wrap_communicator(
communicator: CommT, loop: Optional[asyncio.AbstractEventLoop] = None
) -> 'LoopCommunicator[CommT]':
"""
Wrap a communicator such that all callbacks made to any subscribers are scheduled on the
given event loop.
Expand Down
3 changes: 2 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""Utilities for tests"""
from __future__ import annotations

import asyncio
import collections
Expand Down Expand Up @@ -105,7 +106,7 @@ def hook_broadcast_receiver(
self._broadcast_receivers[identifier] = receiver
return identifier

def unhook_broadcast_receiver(self, identifier: 'ID_TYPE | None') -> None:
def unhook_broadcast_receiver(self, identifier: 'ID_TYPE | None') -> None:
self._ensure_open()
try:
del self._broadcast_receivers[identifier]
Expand Down

0 comments on commit 11ae860

Please sign in to comment.