From 7613fc77ea29ea658be3b2e3f951d65a26af0e01 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Tue, 2 Apr 2024 02:20:51 +0200 Subject: [PATCH] Improve docstrings (#31) --- tests/test_sensor.py | 5 ++--- zha/application/gateway.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_sensor.py b/tests/test_sensor.py index 027d3c1d..0ba80bce 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -1155,7 +1155,7 @@ async def test_last_feeding_size_sensor_v2( @pytest.mark.looptime async def test_device_counter_sensors(zha_gateway: Gateway) -> None: - """Test quirks defined sensor.""" + """Test coordinator counter sensor.""" coordinator = zha_gateway.coordinator_zha_device assert coordinator.is_coordinator @@ -1184,7 +1184,7 @@ async def test_device_unavailable_skips_entity_polling( elec_measurement_zha_dev: Device, # pylint: disable=redefined-outer-name caplog: pytest.LogCaptureFixture, ) -> None: - """Test quirks defined sensor.""" + """Test polling is skipped for unavailable devices.""" assert not elec_measurement_zha_dev.is_coordinator assert not elec_measurement_zha_dev.is_active_coordinator @@ -1194,7 +1194,6 @@ async def test_device_unavailable_skips_entity_polling( assert entity.state["state"] is None - # simulate counter increment on application elec_measurement_zha_dev.device.rssi = 60 await asyncio.sleep(zha_gateway.global_updater.__polling_interval + 2) diff --git a/zha/application/gateway.py b/zha/application/gateway.py index 0cc85674..14b2c13d 100644 --- a/zha/application/gateway.py +++ b/zha/application/gateway.py @@ -101,7 +101,7 @@ class DeviceJoinedEvent: @dataclass(kw_only=True, frozen=True) class DeviceLeftEvent: - """Event to signal that a device has joined the network.""" + """Event to signal that a device has left the network.""" ieee: EUI64 nwk: int