summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2024-01-16 20:47:56 -0300
committerRoger Gonzalez <roger@rogs.me>2024-01-16 20:47:56 -0300
commit1dc2e88a6488611f846e18773db296463f9d6b73 (patch)
treeb68e472ef0163e0f7ebe0e8effd4f72571a81b08
parent018f5284b2245368bdf5566bc6ebb6e9ba6ae44b (diff)
Fixed linting issues
-rwxr-xr-xsrc/ute_wrapper/ute.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ute_wrapper/ute.py b/src/ute_wrapper/ute.py
index 4836e33..62183b4 100755
--- a/src/ute_wrapper/ute.py
+++ b/src/ute_wrapper/ute.py
@@ -302,8 +302,8 @@ class UTEClient:
if num_voltages == 3 and num_currents == 3:
return round(averaged_voltage * averaged_current * self.power_factor * SQUARE_ROOT_OF_THREE, 3)
- else:
- return round(averaged_voltage * averaged_current * self.power_factor, 3)
+
+ return round(averaged_voltage * averaged_current * self.power_factor, 3)
def get_current_usage_info(self) -> dict:
"""
@@ -367,8 +367,10 @@ class UTEClient:
# 5.036 UYU/kwh * 54.16% of the day (13 hours)
# 2.298 UYU/kwh * 29.17% of the day (7 hours)
return sum(rate * portion for rate, portion in zip(TRIPLE_HOUR_RATES, (0.1667, 0.2917, 0.5416)))
- elif plan == "doble":
+
+ if plan == "doble":
# 11.032 UYU/kwh * 16.67% of the day (4 hours)
# 4.422 UYU/kwh * 83.33% of the day (20 hours)
return sum(rate * portion for rate, portion in zip(DOUBLE_HOUR_RATES, (0.1667, 0.8333)))
+
raise InvalidPlanException("Invalid plan name.")