Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename clean_current_condition function to parse_current_condition #194

Merged
merged 1 commit into from
May 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions accuweather/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion accuweather/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down