Skip to content

Commit addeab5

Browse files
author
autoruff
committed
fixup: module-deleted Python code fixed using ruff
1 parent e20911a commit addeab5

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

plugwise/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ def _appl_heater_central_info(
102102
if not module_data["contents"]:
103103
module_data = self._get_module_data(xml_1, locator_2, xml_3)
104104
if not module_data["contents"]:
105-
return Munch() # no module-data present means the device has been removed
105+
return (
106+
Munch()
107+
) # no module-data present means the device has been removed
106108
appl.vendor_name = module_data["vendor_name"]
107109
appl.hardware = module_data["hardware_version"]
108110
appl.model_id = module_data["vendor_model"] if not legacy else None

plugwise/legacy/helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ def _energy_entity_info_finder(self, appliance: etree, appl: Munch) -> Munch:
215215
appliance, locator, self._modules, legacy=True
216216
)
217217
if not module_data["contents"]:
218-
return Munch() # no module-data present means the device has been removed
218+
return (
219+
Munch()
220+
) # no module-data present means the device has been removed
219221

220222
appl.zigbee_mac = module_data["zigbee_mac_address"]
221223
# Filter appliance without zigbee_mac, it's an orphaned device

tests/test_anna.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,4 +566,4 @@ async def test_connect_anna_v4_no_modules(self):
566566
assert self.entity_items == 12
567567

568568
await api.close_connection()
569-
await self.disconnect(server, client)
569+
await self.disconnect(server, client)

0 commit comments

Comments
 (0)