Enable strict typing for oralb (#107438)

This commit is contained in:
Marc Mueller 2024-01-07 10:41:31 +01:00 committed by GitHub
parent c96f9864c5
commit de3fde5901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -295,6 +295,7 @@ homeassistant.components.open_meteo.*
homeassistant.components.openexchangerates.*
homeassistant.components.opensky.*
homeassistant.components.openuv.*
homeassistant.components.oralb.*
homeassistant.components.otbr.*
homeassistant.components.overkiz.*
homeassistant.components.p1_monitor.*

View file

@ -3,7 +3,7 @@ from __future__ import annotations
import logging
from oralb_ble import OralBBluetoothDeviceData
from oralb_ble import OralBBluetoothDeviceData, SensorUpdate
from homeassistant.components.bluetooth import (
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
# directly to the oralb code
# Make sure the device we have is one that we can connect with

View file

@ -2711,6 +2711,16 @@ disallow_untyped_defs = true
warn_return_any = 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.*]
check_untyped_defs = true
disallow_incomplete_defs = true