Enable Ruff D212 (#87347)
This commit is contained in:
parent
97de0c6d9a
commit
ca1a12898c
237 changed files with 353 additions and 707 deletions
|
@ -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],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue