mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Enable strict typing for oralb (#107438)
This commit is contained in:
parent
c96f9864c5
commit
de3fde5901
@ -295,6 +295,7 @@ homeassistant.components.open_meteo.*
|
|||||||
homeassistant.components.openexchangerates.*
|
homeassistant.components.openexchangerates.*
|
||||||
homeassistant.components.opensky.*
|
homeassistant.components.opensky.*
|
||||||
homeassistant.components.openuv.*
|
homeassistant.components.openuv.*
|
||||||
|
homeassistant.components.oralb.*
|
||||||
homeassistant.components.otbr.*
|
homeassistant.components.otbr.*
|
||||||
homeassistant.components.overkiz.*
|
homeassistant.components.overkiz.*
|
||||||
homeassistant.components.p1_monitor.*
|
homeassistant.components.p1_monitor.*
|
||||||
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from oralb_ble import OralBBluetoothDeviceData
|
from oralb_ble import OralBBluetoothDeviceData, SensorUpdate
|
||||||
|
|
||||||
from homeassistant.components.bluetooth import (
|
from homeassistant.components.bluetooth import (
|
||||||
BluetoothScanningMode,
|
BluetoothScanningMode,
|
||||||
@ -45,7 +45,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _async_poll(service_info: BluetoothServiceInfoBleak):
|
async def _async_poll(service_info: BluetoothServiceInfoBleak) -> SensorUpdate:
|
||||||
# BluetoothServiceInfoBleak is defined in HA, otherwise would just pass it
|
# BluetoothServiceInfoBleak is defined in HA, otherwise would just pass it
|
||||||
# directly to the oralb code
|
# directly to the oralb code
|
||||||
# Make sure the device we have is one that we can connect with
|
# Make sure the device we have is one that we can connect with
|
||||||
|
10
mypy.ini
10
mypy.ini
@ -2711,6 +2711,16 @@ disallow_untyped_defs = true
|
|||||||
warn_return_any = true
|
warn_return_any = true
|
||||||
warn_unreachable = true
|
warn_unreachable = true
|
||||||
|
|
||||||
|
[mypy-homeassistant.components.oralb.*]
|
||||||
|
check_untyped_defs = true
|
||||||
|
disallow_incomplete_defs = true
|
||||||
|
disallow_subclassing_any = true
|
||||||
|
disallow_untyped_calls = true
|
||||||
|
disallow_untyped_decorators = true
|
||||||
|
disallow_untyped_defs = true
|
||||||
|
warn_return_any = true
|
||||||
|
warn_unreachable = true
|
||||||
|
|
||||||
[mypy-homeassistant.components.otbr.*]
|
[mypy-homeassistant.components.otbr.*]
|
||||||
check_untyped_defs = true
|
check_untyped_defs = true
|
||||||
disallow_incomplete_defs = true
|
disallow_incomplete_defs = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user