Skip to content

Commit 0fd6333

Browse files
committed
Optimize: switch guards
1 parent 5b1acf4 commit 0fd6333

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
@@ -847,10 +847,10 @@ def _appliance_measurements(
847847
updated_date_locator = (
848848
f'.//logs/point_log[type="{measurement}"]/updated_date'
849849
)
850-
if (
851-
updated_date_key := appliance.find(updated_date_locator)
852-
) is not None:
853-
if measurement in OBSOLETE_MEASUREMENTS:
850+
if measurement in OBSOLETE_MEASUREMENTS:
851+
if (
852+
updated_date_key := appliance.find(updated_date_locator)
853+
) is not None:
854854
updated_date = updated_date_key.text.split("T")[0]
855855
date_1 = dt.datetime.strptime(updated_date, "%Y-%m-%d")
856856
date_2 = dt.datetime.now()

0 commit comments

Comments
 (0)