mirror of
https://github.com/home-assistant/core.git
synced 2025-11-06 17:40:11 +00:00
Enable Ruff D212 (#87347)
This commit is contained in:
@@ -217,8 +217,7 @@ class BayesianBinarySensor(BinarySensorEntity):
|
||||
}
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""
|
||||
Call when entity about to be added.
|
||||
"""Call when entity about to be added.
|
||||
|
||||
All relevant update logic for instance attributes occurs within this closure.
|
||||
Other methods in this class are designed to avoid directly modifying instance
|
||||
@@ -233,8 +232,7 @@ class BayesianBinarySensor(BinarySensorEntity):
|
||||
|
||||
@callback
|
||||
def async_threshold_sensor_state_listener(event: Event) -> None:
|
||||
"""
|
||||
Handle sensor state changes.
|
||||
"""Handle sensor state changes.
|
||||
|
||||
When a state changes, we must update our list of current observations,
|
||||
then calculate the new probability.
|
||||
@@ -384,8 +382,7 @@ class BayesianBinarySensor(BinarySensorEntity):
|
||||
return prior
|
||||
|
||||
def _build_observations_by_entity(self) -> dict[str, list[Observation]]:
|
||||
"""
|
||||
Build and return data structure of the form below.
|
||||
"""Build and return data structure of the form below.
|
||||
|
||||
{
|
||||
"sensor.sensor1": [Observation, Observation],
|
||||
@@ -414,8 +411,7 @@ class BayesianBinarySensor(BinarySensorEntity):
|
||||
return observations_by_entity
|
||||
|
||||
def _build_observations_by_template(self) -> dict[Template, list[Observation]]:
|
||||
"""
|
||||
Build and return data structure of the form below.
|
||||
"""Build and return data structure of the form below.
|
||||
|
||||
{
|
||||
"template": [Observation, Observation],
|
||||
|
||||
Reference in New Issue
Block a user