Commit 1165ee6e authored by Jerome Carnis's avatar Jerome Carnis 🦊
Browse files

deviceMethodWidget.py: fix return types

parent b68e6af0
...@@ -229,7 +229,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget): ...@@ -229,7 +229,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
model_image=None, model_image=None,
config=None, config=None,
parent=None, parent=None,
): ) -> None:
self.external_device_attribute = external_device_attribute self.external_device_attribute = external_device_attribute
self._editable_widgets: List[int] = [] self._editable_widgets: List[int] = []
super().__init__( super().__init__(
...@@ -251,7 +251,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget): ...@@ -251,7 +251,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
else: else:
self.input_value.children()[index].setEnabled(True) # type: ignore self.input_value.children()[index].setEnabled(True) # type: ignore
def _find_editable_widgets(self): def _find_editable_widgets(self) -> None:
"""Find the indices of the input fields that should be enabled/disabled""" """Find the indices of the input fields that should be enabled/disabled"""
if self.input_value is not None: if self.input_value is not None:
for idx, child in enumerate(self.input_value.children()): for idx, child in enumerate(self.input_value.children()):
...@@ -262,7 +262,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget): ...@@ -262,7 +262,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
if isinstance(grandchild, (QSpinBox, QDoubleSpinBox)): if isinstance(grandchild, (QSpinBox, QDoubleSpinBox)):
self._editable_widgets.append(idx) self._editable_widgets.append(idx)
def init_signals(self): def init_signals(self) -> None:
""" """
Connect the signals to the slots. Connect the signals to the slots.
...@@ -272,7 +272,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget): ...@@ -272,7 +272,7 @@ class MethodEnabledByAttributeWidget(DeviceMethodEnabledWidget):
self.sig_control_changed.connect(self.control_changed) self.sig_control_changed.connect(self.control_changed)
@pyqtSlot() @pyqtSlot()
def slot_handle_configuration(self): def slot_handle_configuration(self) -> None:
DeviceWidget.slot_handle_configuration(self) DeviceWidget.slot_handle_configuration(self)
self.input_not_ready_placeholder.setParent(None) self.input_not_ready_placeholder.setParent(None)
layout = self.widget_holder.layout() layout = self.widget_holder.layout()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment