Skip to content

Commit a648c73

Browse files
committed
Ruff formatting
1 parent 86eaf12 commit a648c73

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

plugwise/helper.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,9 @@ def _appliance_info_finder(self, appl: Munch, appliance: etree) -> Munch:
404404
return self._appl_thermostat_info(appl, appliance)
405405
case "heater_central":
406406
# Collect heater_central device info
407-
self._appl_heater_central_info(appl, appliance, False) # False means non-legacy device
407+
self._appl_heater_central_info(
408+
appl, appliance, False
409+
) # False means non-legacy device
408410
self._dhw_allowed_modes = self._get_appl_actuator_modes(
409411
appliance, "domestic_hot_water_mode_control_functionality"
410412
)
@@ -463,10 +465,14 @@ def _appl_gateway_info(self, appl: Munch, appliance: etree) -> Munch:
463465

464466
return appl
465467

466-
def _get_appl_actuator_modes(self, appliance: etree, actuator_type: str) -> list[str]:
468+
def _get_appl_actuator_modes(
469+
self, appliance: etree, actuator_type: str
470+
) -> list[str]:
467471
"""Helper-function for _appliance_info_finder()."""
468472
mode_list: list[str] = []
469-
if (search := search_actuator_functionalities(appliance, actuator_type)) is not None:
473+
if (
474+
search := search_actuator_functionalities(appliance, actuator_type)
475+
) is not None:
470476
if (modes := search.find("allowed_modes")) is not None:
471477
for mode in modes:
472478
mode_list.append(mode.text)
@@ -696,7 +702,9 @@ def _get_actuator_functionalities(
696702
act_item = cast(ActuatorType, item)
697703
data[act_item] = temp_dict
698704

699-
def _get_actuator_mode(self, appliance: etree, entity_id: str, key: str) -> str | None:
705+
def _get_actuator_mode(
706+
self, appliance: etree, entity_id: str, key: str
707+
) -> str | None:
700708
"""Helper-function for _get_regulation_mode and _get_gateway_mode.
701709
702710
Collect the requested gateway mode.
@@ -716,7 +724,11 @@ def _get_regulation_mode(
716724
717725
Adam: collect the gateway regulation_mode.
718726
"""
719-
if (mode := self._get_actuator_mode(appliance, entity_id, "regulation_mode_control_functionality")) is not None:
727+
if (
728+
mode := self._get_actuator_mode(
729+
appliance, entity_id, "regulation_mode_control_functionality"
730+
)
731+
) is not None:
720732
data["select_regulation_mode"] = mode
721733
self._count += 1
722734
self._cooling_enabled = mode == "cooling"
@@ -728,7 +740,11 @@ def _get_gateway_mode(
728740
729741
Adam: collect the gateway mode.
730742
"""
731-
if (mode := self._get_actuator_mode(appliance, entity_id, "gateway_mode_control_functionality")) is not None:
743+
if (
744+
mode := self._get_actuator_mode(
745+
appliance, entity_id, "gateway_mode_control_functionality"
746+
)
747+
) is not None:
732748
data["select_gateway_mode"] = mode
733749
self._count += 1
734750

0 commit comments

Comments
 (0)