From 16b64e41c86ac141c7c17e0239893f62ea92ba1c Mon Sep 17 00:00:00 2001
From: Pim Hutting
Date: Fri, 14 Nov 2025 14:12:14 +0000
Subject: [PATCH] style: applied style suggestions
close: N25B-236
---
src/robot_interface/core/config.py | 24 ++++++++++++-------
.../endpoints/actuation_receiver.py | 2 +-
src/robot_interface/endpoints/audio_sender.py | 2 +-
.../endpoints/main_receiver.py | 2 +-
4 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/src/robot_interface/core/config.py b/src/robot_interface/core/config.py
index e8489bd..780f4d2 100644
--- a/src/robot_interface/core/config.py
+++ b/src/robot_interface/core/config.py
@@ -1,39 +1,47 @@
-
from __future__ import unicode_literals
-import os
class AgentSettings(object):
"""Agent port configuration."""
- def __init__(self, actuating_receiver_port=5557, main_receiver_port=5555,video_sender_port=5556, audio_sender_port=5558):
+ def __init__(
+ self,
+ actuating_receiver_port=5557,
+ main_receiver_port=5555,
+ video_sender_port=5556,
+ audio_sender_port=5558,
+ ):
self.actuating_receiver_port = actuating_receiver_port
self.main_receiver_port = main_receiver_port
self.video_sender_port = video_sender_port
self.audio_sender_port = audio_sender_port
-
class VideoConfig(object):
"""Video configuration constants."""
- def __init__(self, camera_index=0, resolution=2, color_space=11, fps=15, stream_name="Pepper Video", image_buffer=6):
+ def __init__(
+ self,
+ camera_index=0,
+ resolution=2,
+ color_space=11,
+ fps=15,
+ stream_name="Pepper Video",
+ image_buffer=6,
+ ):
self.camera_index = camera_index
self.resolution = resolution
self.color_space = color_space
self.fps = fps
self.stream_name = stream_name
self.image_buffer = image_buffer
-
class AudioConfig(object):
"""Audio configuration constants."""
def __init__(self, sample_rate=16000, chunk_size=512, channels=1):
self.sample_rate = sample_rate
self.chunk_size = chunk_size
self.channels = channels
-
class MainConfig(object):
"""Main configuration"""
def __init__(self, poll_timeout_ms=100, max_handler_time_ms=50):
self.poll_timeout_ms = poll_timeout_ms
self.max_handler_time_ms = max_handler_time_ms
-
class Settings(object):
"""Global settings container."""
def __init__(self, agent_settings=None, video_config=None, audio_config=None, main_config=None):
diff --git a/src/robot_interface/endpoints/actuation_receiver.py b/src/robot_interface/endpoints/actuation_receiver.py
index 7fc6546..c5e8ab3 100644
--- a/src/robot_interface/endpoints/actuation_receiver.py
+++ b/src/robot_interface/endpoints/actuation_receiver.py
@@ -10,7 +10,7 @@ from robot_interface.core.config import settings
class ActuationReceiver(ReceiverBase):
- def __init__(self, zmq_context, port= settings.agent_settings.actuating_receiver_port):
+ def __init__(self, zmq_context, port=settings.agent_settings.actuating_receiver_port):
"""
The actuation receiver endpoint, responsible for handling speech and gesture requests.
diff --git a/src/robot_interface/endpoints/audio_sender.py b/src/robot_interface/endpoints/audio_sender.py
index 2e1e45e..e6de258 100644
--- a/src/robot_interface/endpoints/audio_sender.py
+++ b/src/robot_interface/endpoints/audio_sender.py
@@ -14,7 +14,7 @@ logger = logging.getLogger(__name__)
class AudioSender(SocketBase):
- def __init__(self, zmq_context, port= settings.agent_settings.audio_sender_port):
+ def __init__(self, zmq_context, port=settings.agent_settings.audio_sender_port):
super(AudioSender, self).__init__(str("audio")) # Convert future's unicode_literal to str
self.create_socket(zmq_context, zmq.PUB, port)
self.thread = None
diff --git a/src/robot_interface/endpoints/main_receiver.py b/src/robot_interface/endpoints/main_receiver.py
index e5367c6..b0adf24 100644
--- a/src/robot_interface/endpoints/main_receiver.py
+++ b/src/robot_interface/endpoints/main_receiver.py
@@ -6,7 +6,7 @@ from robot_interface.state import state
from robot_interface.core.config import settings
class MainReceiver(ReceiverBase):
- def __init__(self, zmq_context, port= settings.agent_settings.main_receiver_port):
+ def __init__(self, zmq_context, port=settings.agent_settings.main_receiver_port):
"""
The main receiver endpoint, responsible for handling ping and negotiation requests.