Skip to content

Commit

Permalink
chore(lint): [pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 6, 2025
1 parent 4ef234b commit 205e89f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/powercalc/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from typing import Any, cast

import voluptuous as vol
from awesomeversion import AwesomeVersion
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.utility_meter import CONF_METER_TYPE, METER_TYPES
from homeassistant.config_entries import ConfigEntry, ConfigEntryBaseFlow, ConfigFlow, ConfigFlowResult, OptionsFlow
Expand All @@ -29,6 +30,8 @@
UnitOfEnergy,
UnitOfPower,
UnitOfTime,
)
from homeassistant.const import (
__version__ as HAVERSION,

Check notice on line 35 in custom_components/powercalc/config_flow.py

View workflow job for this annotation

GitHub Actions / qodana

PEP 8 naming convention violation

Lowercase variable imported as non-lowercase
)
from homeassistant.core import callback
Expand All @@ -37,7 +40,6 @@
from homeassistant.helpers import selector
from homeassistant.helpers.schema_config_entry_flow import SchemaFlowError
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from awesomeversion import AwesomeVersion

from .common import SourceEntity, create_source_entity
from .const import (
Expand Down Expand Up @@ -1677,7 +1679,7 @@ class PowercalcOptionsFlow(PowercalcCommonFlow, OptionsFlow):
def __init__(self, config_entry: ConfigEntry) -> None:
"""Initialize options flow."""
super().__init__()
if AwesomeVersion(HAVERSION) < '2024.12':
if AwesomeVersion(HAVERSION) < "2024.12":
self.config_entry = config_entry
self.sensor_config = dict(config_entry.data)
self.sensor_type: SensorType = self.sensor_config.get(CONF_SENSOR_TYPE) or SensorType.VIRTUAL_POWER
Expand Down

0 comments on commit 205e89f

Please sign in to comment.