Skip to content

Commit

Permalink
refactor: change Config import to use ConfigType instead (#390)
Browse files Browse the repository at this point in the history
* refactor: change `Config` import to use `ConfigType` instead

* remove unused import

* update mypy config
  • Loading branch information
firstof9 authored Oct 30, 2024
1 parent f0f5c1a commit 34178e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions custom_components/keymaster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
EVENT_HOMEASSISTANT_STARTED,
STATE_ON,
)
from homeassistant.core import Config, CoreState, Event, HomeAssistant, ServiceCall
from homeassistant.core import CoreState, Event, HomeAssistant, ServiceCall
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity_registry import (
EntityRegistry,
async_get as async_get_entity_registry,
)
from homeassistant.helpers.event import async_track_state_change_event
from homeassistant.helpers.typing import ConfigType
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from homeassistant.util import slugify

Expand Down Expand Up @@ -120,7 +121,7 @@ async def homeassistant_started_listener(


async def async_setup( # pylint: disable-next=unused-argument
hass: HomeAssistant, config: Config
hass: HomeAssistant, config: ConfigType
) -> bool:
"""Disallow configuration via YAML."""
return True
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.10
python_version = 3.12
show_error_codes = true
ignore_errors = true
follow_imports = silent
Expand Down Expand Up @@ -29,4 +29,4 @@ multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
line_length = 88
line_length = 88

0 comments on commit 34178e1

Please sign in to comment.