From 42a6e4b845ef63cfba56d1890af941bfaf158b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Mind=C3=AAllo=20de=20Andrade?= Date: Tue, 26 Dec 2023 12:34:23 -0300 Subject: [PATCH] fix: explicit method naming --- sunweg/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sunweg/api.py b/sunweg/api.py index 65f08dc..04aa50d 100644 --- a/sunweg/api.py +++ b/sunweg/api.py @@ -288,9 +288,9 @@ def month_stats_production(self, year: int, month: int, plant: Plant, inverter: :return: list of daily energy production statistics :rtype: list[ProductionStats] """ - return self.month_stats_production(year, month, plant.id, inverter.id if inverter is not None else None, retry) + return self.month_stats_production_by_id(year, month, plant.id, inverter.id if inverter is not None else None, retry) - def month_stats_production(self, year: int, month: int, plant_id: int, inverter_id: int | None = None, retry: bool = True) -> list[ProductionStats]: + def month_stats_production_by_id(self, year: int, month: int, plant_id: int, inverter_id: int | None = None, retry: bool = True) -> list[ProductionStats]: """ Retrieve month energy production statistics. @@ -314,7 +314,7 @@ def month_stats_production(self, year: int, month: int, plant_id: int, inverter_ except LoginError: if retry: self.authenticate() - return self.month_stats_production(year, month, plant_id, inverter_id, False) + return self.month_stats_production_by_id(year, month, plant_id, inverter_id, False) return [] def _populate_MPPT(self, result: dict, inverter: Inverter) -> None: