Skip to content

Commit

Permalink
Fix Remaining Lint Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofghosts committed Jan 10, 2024
1 parent 874bbe1 commit c789e2f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion custom_components/pirateweather/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async def async_step_user(self, user_input=None):
"base"
] = "Invalid API Key, Ensure that the subscribe button is clicked for this endpoint: https://pirateweather.net/apis/hv9nrw1tjg/Beta"

except:
except Exception:
_LOGGER.warning("Pirate Weather Setup Error: HTTP Error: " + api_status)
errors["base"] = "API Error: " + api_status

Expand Down
8 changes: 0 additions & 8 deletions custom_components/pirateweather/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,14 +812,6 @@ def update_unit_of_measurement(self) -> None:
self.entity_description, unit_key
)

@property
def icon(self):
"""Icon to use in the frontend, if any."""
if "summary" in self.type and self._icon in CONDITION_PICTURES:
return CONDITION_PICTURES[self._icon][1]

return SENSOR_TYPES[self.type][6]

@property
def icon(self) -> str | None:
"""Icon to use in the frontend, if any."""
Expand Down
3 changes: 2 additions & 1 deletion custom_components/pirateweather/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.core import HomeAssistant, callback
from .weather_update_coordinator import WeatherUpdateCoordinator
from .typing import DiscoveryInfoType


from homeassistant.components.weather import (
Expand Down Expand Up @@ -142,7 +143,7 @@ def _map_daily_forecast(forecast) -> Forecast:
}


def _map_hourly_forecast(forecast: dict[str, Any]) -> Forecast:
def _map_hourly_forecast(forecast) -> Forecast:
return {
"datetime": utc_from_timestamp(forecast.d.get("time")).isoformat(),
"condition": MAP_CONDITION.get(forecast.d.get("icon")),
Expand Down

0 comments on commit c789e2f

Please sign in to comment.