From 4ad682d22c79909b44481b054e8dc67716bcc97b Mon Sep 17 00:00:00 2001 From: Juan Lopez Fernandez Date: Fri, 17 Nov 2023 10:48:21 +0100 Subject: [PATCH] Please Python Linter Signed-off-by: Juan Lopez Fernandez --- .../controller_tool/tool/src/py/ControllerGUI.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/controller/controller_tool/tool/src/py/ControllerGUI.py b/controller/controller_tool/tool/src/py/ControllerGUI.py index 4c0145c5f..7fb75ef1e 100644 --- a/controller/controller_tool/tool/src/py/ControllerGUI.py +++ b/controller/controller_tool/tool/src/py/ControllerGUI.py @@ -81,7 +81,7 @@ def __init__(self, current_dds_domain): def get_dds_domain(self): """Return DDS Domain from spin box as integer value.""" return int(self.spin_box.value()) - + class DdsTopicNameDialog(QDialog): """Class that implements the a dialog to set the DDS command and status topic names.""" @@ -234,9 +234,15 @@ def on_ddsrecorder_status(self, previous_status, current_status, info): # Change status bar self.update_status(RecorderStatus[current_status.upper()]) - def restart_controller(self, dds_domain=0, command_topic='/ddsrecorder/command', status_topic='/ddsrecorder/status'): + def restart_controller( + self, + dds_domain=0, + command_topic='/ddsrecorder/command', + status_topic='/ddsrecorder/status'): """Restart the DDS Controller if the DDS Domain or topic name changes.""" - if dds_domain != self.dds_domain or command_topic != self.command_topic or status_topic != self.status_topic: + if (dds_domain != self.dds_domain + or command_topic != self.command_topic + or status_topic != self.status_topic): if self.dds_controller.is_valid_dds_domain(dds_domain): # Delete DDS entities in previous domain self.dds_controller.delete_dds() @@ -376,7 +382,7 @@ def dds_domain_dialog(self): if domain != self.dds_domain: if (self.dds_controller.is_valid_dds_domain(domain)): self.restart_controller(domain, self.command_topic, self.status_topic) - + def topic_name_dialog(self): """Create a dialog to update the recorder topic names.""" dialog = DdsTopicNameDialog(self.command_topic, self.status_topic)