From c647e83c4cc771d816a962834a2b81f0361fb4f1 Mon Sep 17 00:00:00 2001 From: Jules Dejaeghere Date: Sat, 1 Jun 2024 20:39:37 +0200 Subject: [PATCH] Add docstring --- custom_components/irm_kmi/coordinator.py | 2 ++ custom_components/irm_kmi/rain_graph.py | 1 + 2 files changed, 3 insertions(+) diff --git a/custom_components/irm_kmi/coordinator.py b/custom_components/irm_kmi/coordinator.py index 1f7fcfa..a99f97b 100644 --- a/custom_components/irm_kmi/coordinator.py +++ b/custom_components/irm_kmi/coordinator.py @@ -141,6 +141,7 @@ class IrmKmiCoordinator(TimestampDataUpdateCoordinator): return radar_animation async def _async_pollen_data(self, api_data: dict) -> dict: + """Get SVG pollen info from the API, return the pollen data dict""" _LOGGER.debug("Getting pollen data from API") svg_url = None for module in api_data.get('module', []): @@ -324,6 +325,7 @@ class IrmKmiCoordinator(TimestampDataUpdateCoordinator): @staticmethod def radar_list_to_forecast(data: dict | None) -> List[IrmKmiRadarForecast] | None: + """Create a list of short term forecasts for rain based on the data provided by the rain radar""" if data is None: return None sequence = data.get("sequence", []) diff --git a/custom_components/irm_kmi/rain_graph.py b/custom_components/irm_kmi/rain_graph.py index 2ead986..c6ff21d 100644 --- a/custom_components/irm_kmi/rain_graph.py +++ b/custom_components/irm_kmi/rain_graph.py @@ -69,6 +69,7 @@ class RainGraph: self._dwg_still: Drawing = Drawing() async def build(self) -> Self: + """Build the rain graph by calling all the method in the right order. Returns self when done""" await self.draw_svg_frame() self.draw_hour_bars() self.draw_chances_path()