Skip to content

Commit

Permalink
Pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rachwalk committed Jan 2, 2025
1 parent 6b42247 commit f1c2a6d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions src/rai/rai/communication/base_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
from abc import ABC, abstractmethod
from typing import Callable
from uuid import uuid4


class BaseMessage(ABC):
...
pass


class BaseConnector(ABC):

Expand All @@ -27,20 +28,22 @@ def _generate_handle(self) -> str:

@abstractmethod
def send_message(self, msg: BaseMessage, target: str) -> None:
...
pass

@abstractmethod
def receive_message(self, source: str) -> BaseMessage:
...
pass

@abstractmethod
def send_and_wait(self, target: str) -> BaseMessage:
...
pass

@abstractmethod
def start_action(self, target: str, on_feedback: Callable, on_finish: Callable = lambda _: None) -> str:
...

def start_action(
self, target: str, on_feedback: Callable, on_finish: Callable = lambda _: None
) -> str:
pass

@abstractmethod
def terminate_action(self, action_handle: str):
...
pass
2 changes: 1 addition & 1 deletion tests/communication/test_sound_device_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_start_action_failed_init(

recording_device = 0
with pytest.raises(SoundDeviceError, match="Device 0 has not been configured"):
stream_handle = audio_input_device.start_action(
_ = audio_input_device.start_action(
str(recording_device), feedback_callback, finish_callback
)

Expand Down

0 comments on commit f1c2a6d

Please sign in to comment.