Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pantherale0 authored Sep 13, 2024
1 parent 5a4a1b7 commit 673b11c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions custom_components/fuel_prices/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Fuel Prices integration."""

import contextlib
import logging

from datetime import timedelta
Expand Down Expand Up @@ -30,20 +29,21 @@
from .const import DOMAIN, CONF_AREAS, CONF_SOURCES, CONF_CHEAPEST_SENSORS, CONF_CHEAPEST_SENSORS_COUNT, CONF_CHEAPEST_SENSORS_FUEL_TYPE
from .coordinator import FuelPricesCoordinator

type FuelPricesConfigEntry = ConfigEntry[FuelPricesConfig]

_LOGGER = logging.getLogger(__name__)
PLATFORMS = [Platform.SENSOR]


@dataclass
class FuelPricesConfig:
"""Represent a config for Anglian Water."""
"""Represent a Fuel Price Config."""

coordinator: FuelPricesCoordinator
areas: list[dict]


type FuelPricesConfigEntry = ConfigEntry[FuelPricesConfig]


def _build_configured_areas(hass_areas: dict) -> list[dict]:
module_areas = []
for area in hass_areas:
Expand Down
1 change: 0 additions & 1 deletion custom_components/fuel_prices/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import logging
from typing import Any
from homeassistant.config_entries import ConfigEntry, OptionsFlow

from pyfuelprices.sources.mapping import SOURCE_MAP, COUNTRY_MAP
import voluptuous as vol
Expand Down
4 changes: 1 addition & 3 deletions custom_components/fuel_prices/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@

from homeassistant.components.sensor import SensorEntity
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS, CONF_NAME, STATE_UNKNOWN
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from pyfuelprices.const import PROP_FUEL_LOCATION_SOURCE
from . import FuelPricesConfigEntry
from .const import CONF_AREAS, DOMAIN, CONF_STATE_VALUE, CONF_CHEAPEST_SENSORS, CONF_CHEAPEST_SENSORS_COUNT, CONF_CHEAPEST_SENSORS_FUEL_TYPE
from .const import CONF_STATE_VALUE, CONF_CHEAPEST_SENSORS, CONF_CHEAPEST_SENSORS_COUNT, CONF_CHEAPEST_SENSORS_FUEL_TYPE
from .entity import FuelStationEntity, CheapestFuelEntity
from .coordinator import FuelPricesCoordinator

_LOGGER = logging.getLogger(__name__)

Expand Down

0 comments on commit 673b11c

Please # to comment.