Skip to content

Commit b3c136e

Browse files
autoruffbouwew
authored andcommitted
fixup: different-update Python code fixed using ruff
1 parent 6f3d772 commit b3c136e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugwise/helper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,7 @@ def _match_and_rank_thermostats(self) -> dict[str, ThermoLoc]:
803803
"thermostatic_radiator_valve": 1,
804804
}
805805
for location_id, location in self._loc_data.items():
806-
location.update(
807-
{"primary": [], "primary_prio": 0, "secondary": []}
808-
)
806+
location.update({"primary": [], "primary_prio": 0, "secondary": []})
809807
for entity_id, entity in self.gw_entities.items():
810808
self._rank_thermostat(
811809
entity_id, entity, location_id, location, thermo_matching
@@ -829,7 +827,9 @@ def _rank_thermostat(
829827
# Pre-elect new primary
830828
if thermo_matching[appl_class] == location["primary_prio"]:
831829
location["primary"].append(entity_id)
832-
elif (thermo_rank := thermo_matching[appl_class]) > location["primary_prio"]:
830+
elif (thermo_rank := thermo_matching[appl_class]) > location[
831+
"primary_prio"
832+
]:
833833
location["primary_prio"] = thermo_rank
834834
# Demote former primary
835835
if tl_primary := location["primary"]:

0 commit comments

Comments
 (0)