From fa0c516613475b30a105a2b48ab223647a7bfb7d Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Sat, 27 May 2023 15:40:34 +0200 Subject: [PATCH] Rename clean_current_condition function to parse_current_condition --- accuweather/__init__.py | 4 ++-- accuweather/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/accuweather/__init__.py b/accuweather/__init__.py index ec814c4..9902f0d 100644 --- a/accuweather/__init__.py +++ b/accuweather/__init__.py @@ -27,8 +27,8 @@ RequestsExceededError, ) from .utils import ( - clean_current_condition, construct_url, + parse_current_condition, parse_daily_forecast, parse_hourly_forecast, valid_api_key, @@ -120,7 +120,7 @@ async def async_get_current_conditions(self) -> dict[str, Any]: language=self.language, ) data = await self._async_get_data(url) - return clean_current_condition(data, REMOVE_FROM_CURRENT_CONDITION) + return parse_current_condition(data, REMOVE_FROM_CURRENT_CONDITION) async def async_get_daily_forecast( self, days: int = 5, metric: bool = True diff --git a/accuweather/utils.py b/accuweather/utils.py index 338a7ec..4929989 100644 --- a/accuweather/utils.py +++ b/accuweather/utils.py @@ -40,7 +40,7 @@ def construct_url(arg: str, **kwargs: str) -> str: return ENDPOINT + URLS[arg].format(**kwargs) -def clean_current_condition( +def parse_current_condition( data: dict[str, Any], to_remove: tuple[str, ...] ) -> dict[str, Any]: """Clean current condition API response."""