mirror of https://github.com/home-assistant/core
Enable strict typing on Bayesian (#79870)
* make bayesian static * no longer private
This commit is contained in:
parent
77864ad80f
commit
b86927a453
|
@ -64,6 +64,7 @@ homeassistant.components.automation.*
|
|||
homeassistant.components.awair.*
|
||||
homeassistant.components.backup.*
|
||||
homeassistant.components.baf.*
|
||||
homeassistant.components.bayesian.*
|
||||
homeassistant.components.binary_sensor.*
|
||||
homeassistant.components.bluetooth.*
|
||||
homeassistant.components.bluetooth_tracker.*
|
||||
|
|
|
@ -34,6 +34,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
from homeassistant.helpers.event import (
|
||||
TrackTemplate,
|
||||
TrackTemplateResult,
|
||||
TrackTemplateResultInfo,
|
||||
async_track_state_change_event,
|
||||
async_track_template_result,
|
||||
)
|
||||
|
@ -189,7 +190,7 @@ class BayesianBinarySensor(BinarySensorEntity):
|
|||
self._probability_threshold = probability_threshold
|
||||
self._attr_device_class = device_class
|
||||
self._attr_is_on = False
|
||||
self._callbacks: list = []
|
||||
self._callbacks: list[TrackTemplateResultInfo] = []
|
||||
|
||||
self.prior = prior
|
||||
self.probability = prior
|
||||
|
|
10
mypy.ini
10
mypy.ini
|
@ -392,6 +392,16 @@ disallow_untyped_defs = true
|
|||
warn_return_any = true
|
||||
warn_unreachable = true
|
||||
|
||||
[mypy-homeassistant.components.bayesian.*]
|
||||
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.binary_sensor.*]
|
||||
check_untyped_defs = true
|
||||
disallow_incomplete_defs = true
|
||||
|
|
Loading…
Reference in New Issue