Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pantherale0 committed Jan 6, 2024
1 parent e81f354 commit f064d1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions custom_components/fuel_prices/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Config flow for MSFT Family Safety."""
"""Config flow for Fuel Prices."""

import logging
from typing import Any
Expand Down Expand Up @@ -69,7 +69,7 @@ async def async_step_user(
return await self.async_step_main_menu()

async def async_step_main_menu(self, _: None = None):
"""Main menu."""
"""Display configuration menu."""
return self.async_show_menu(
step_id="main_menu",
menu_options={
Expand All @@ -80,7 +80,7 @@ async def async_step_main_menu(self, _: None = None):
)

async def async_step_sources(self, user_input: dict[str, Any] | None = None):
"""Sources configuration step."""
"""Set data source config."""
if user_input is not None:
self.configured_sources = user_input[CONF_SOURCES]
return await self.async_step_main_menu(None)
Expand Down Expand Up @@ -231,7 +231,7 @@ async def async_step_area_delete(self, user_input: dict[str, Any] | None = None)
return await self.async_step_area_menu()

async def async_step_finished(self, user_input: dict[str, Any] | None = None):
"""Final confirmation step."""
"""Save configuration."""
errors: dict[str, str] = {}
if user_input is not None:
user_input[CONF_SOURCES] = (
Expand All @@ -246,6 +246,7 @@ async def async_step_finished(self, user_input: dict[str, Any] | None = None):
@staticmethod
@callback
def async_get_options_flow(config_entry: ConfigEntry) -> OptionsFlow:
"""Return option flow."""
return FuelPricesOptionsFlow(config_entry)


Expand All @@ -272,11 +273,11 @@ def configured_area_names(self) -> list[str]:
return items

async def async_step_init(self, _: None = None):
"""Initial option flow step."""
"""User init option flow."""
return await self.async_step_main_menu()

async def async_step_main_menu(self, _: None = None):
"""Main menu."""
"""Display configuration menu."""
return self.async_show_menu(
step_id="main_menu",
menu_options={
Expand All @@ -287,7 +288,7 @@ async def async_step_main_menu(self, _: None = None):
)

async def async_step_sources(self, user_input: dict[str, Any] | None = None):
"""Source configuration step."""
"""Set data source config."""
if user_input is not None:
self.configured_sources = user_input[CONF_SOURCES]
return await self.async_step_main_menu(None)
Expand Down Expand Up @@ -438,7 +439,7 @@ async def async_step_area_delete(self, user_input: dict[str, Any] | None = None)
return await self.async_step_area_menu()

async def async_step_finished(self, user_input: dict[str, Any] | None = None):
"""Final confirmation step."""
"""Save configuration."""
errors: dict[str, str] = {}
if user_input is not None:
user_input[CONF_SOURCES] = (
Expand Down
2 changes: 1 addition & 1 deletion custom_components/fuel_prices/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Setup fuel prices device tracker component."""
"""Integration platform creation."""
cooridinator: FuelPricesCoordinator = hass.data[DOMAIN][entry.entry_id]
areas = entry.data[CONF_AREAS]
entities = []
Expand Down

0 comments on commit f064d1f

Please sign in to comment.