Skip to content

Commit

Permalink
Fix linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktBurger committed Jan 8, 2024
1 parent 2e6eafe commit dfe1750
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pyleco/utils/message_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,11 @@ def _send(self, receiver: Union[bytes, str], sender: Union[bytes, str] = b"",
else:
self._send_message(message)

def send(self, receiver: Union[bytes, str], data: Optional[Any] = None,
conversation_id: Optional[bytes] = None, **kwargs) -> None:
def send(self,
receiver: Union[bytes, str],
conversation_id: Optional[bytes] = None,
data: Optional[Any] = None,
**kwargs) -> None:
"""Send a message to a receiver with serializable `data`."""
self._send(receiver=receiver, data=data, conversation_id=conversation_id, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_message_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def test_loop_element_does_not_change_heartbeat_if_short(self, handler_l: Messag
def test_KeyboardInterrupt_in_loop(self, handler: MessageHandler):
def raise_error(poller, waiting_time):
raise KeyboardInterrupt
handler.sign_in = MagicMock()
handler.sign_in = MagicMock() # type: ignore[method-assign]
handler._listen_loop_element = raise_error # type: ignore
handler.listen()
# assert that no error is raised and that the test does not hang
Expand Down

0 comments on commit dfe1750

Please sign in to comment.