Enable Ruff D212 (#87347)

This commit is contained in:
Franck Nijhof 2023-02-03 23:08:48 +01:00 committed by GitHub
parent 97de0c6d9a
commit ca1a12898c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
237 changed files with 353 additions and 707 deletions

View file

@ -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],