Remove repetitive words in comments and docstrings (#113529)
chore: remove repetitive words Signed-off-by: soonsouth <cuibuwei@163.com>
This commit is contained in:
parent
a73553581b
commit
cfc2f17f35
8 changed files with 13 additions and 13 deletions
|
@ -95,7 +95,7 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
|
|||
|
||||
@property
|
||||
def is_running(self) -> bool:
|
||||
"""True if the the UDP server is started and hasn't been asked to stop."""
|
||||
"""True if the UDP server is started and hasn't been asked to stop."""
|
||||
return self.started and (not self.stop_requested)
|
||||
|
||||
async def start_server(self) -> int:
|
||||
|
|
|
@ -597,7 +597,7 @@ async def test_connectable_advertisement_can_be_retrieved_with_best_path_is_non_
|
|||
) -> None:
|
||||
"""Test we can still get a connectable BLEDevice when the best path is non-connectable.
|
||||
|
||||
In this case the the device is closer to a non-connectable scanner, but the
|
||||
In this case the device is closer to a non-connectable scanner, but the
|
||||
at least one connectable scanner has the device in range.
|
||||
"""
|
||||
|
||||
|
|
|
@ -1613,7 +1613,7 @@ async def test_light_service_call_color_conversion(
|
|||
_, data = entity5.last_call("turn_on")
|
||||
assert data == {"brightness": 255, "rgbw_color": (0, 0, 0, 255)}
|
||||
_, data = entity6.last_call("turn_on")
|
||||
# The midpoint of the the white channels is warm, compensated by adding green + blue
|
||||
# The midpoint of the white channels is warm, compensated by adding green + blue
|
||||
assert data == {"brightness": 255, "rgbww_color": (0, 76, 141, 255, 255)}
|
||||
_, data = entity7.last_call("turn_on")
|
||||
assert data == {"brightness": 255, "color_temp_kelvin": 5962, "color_temp": 167}
|
||||
|
@ -1686,7 +1686,7 @@ async def test_light_service_call_color_conversion(
|
|||
_, data = entity5.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "rgbw_color": (0, 0, 0, 255)}
|
||||
_, data = entity6.last_call("turn_on")
|
||||
# The midpoint the the white channels is warm, compensated by adding green + blue
|
||||
# The midpoint the white channels is warm, compensated by adding green + blue
|
||||
assert data == {"brightness": 128, "rgbww_color": (0, 76, 141, 255, 255)}
|
||||
_, data = entity7.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "color_temp_kelvin": 5962, "color_temp": 167}
|
||||
|
@ -1759,7 +1759,7 @@ async def test_light_service_call_color_conversion(
|
|||
_, data = entity5.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "rgbw_color": (1, 0, 0, 255)}
|
||||
_, data = entity6.last_call("turn_on")
|
||||
# The midpoint the the white channels is warm, compensated by adding green + blue
|
||||
# The midpoint the white channels is warm, compensated by adding green + blue
|
||||
assert data == {"brightness": 128, "rgbww_color": (0, 75, 140, 255, 255)}
|
||||
_, data = entity7.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "color_temp_kelvin": 5962, "color_temp": 167}
|
||||
|
@ -1796,7 +1796,7 @@ async def test_light_service_call_color_conversion(
|
|||
_, data = entity5.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "rgbw_color": (128, 0, 0, 64)}
|
||||
_, data = entity6.last_call("turn_on")
|
||||
# The midpoint the the white channels is warm, compensated by adding green + blue
|
||||
# The midpoint the white channels is warm, compensated by adding green + blue
|
||||
assert data == {"brightness": 128, "rgbww_color": (128, 0, 30, 117, 117)}
|
||||
_, data = entity7.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "color_temp_kelvin": 3011, "color_temp": 332}
|
||||
|
@ -1833,7 +1833,7 @@ async def test_light_service_call_color_conversion(
|
|||
_, data = entity5.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "rgbw_color": (255, 255, 255, 255)}
|
||||
_, data = entity6.last_call("turn_on")
|
||||
# The midpoint the the white channels is warm, compensated by adding green + blue
|
||||
# The midpoint the white channels is warm, compensated by adding green + blue
|
||||
assert data == {"brightness": 128, "rgbww_color": (0, 76, 141, 255, 255)}
|
||||
_, data = entity7.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "color_temp_kelvin": 5962, "color_temp": 167}
|
||||
|
@ -1904,7 +1904,7 @@ async def test_light_service_call_color_conversion(
|
|||
_, data = entity4.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "hs_color": (27.429, 27.451)}
|
||||
_, data = entity5.last_call("turn_on")
|
||||
# The midpoint the the white channels is warm, compensated by decreasing green + blue
|
||||
# The midpoint the white channels is warm, compensated by decreasing green + blue
|
||||
assert data == {"brightness": 128, "rgbw_color": (96, 44, 0, 255)}
|
||||
_, data = entity6.last_call("turn_on")
|
||||
assert data == {"brightness": 128, "rgbww_color": (255, 255, 255, 255, 255)}
|
||||
|
|
|
@ -449,7 +449,7 @@ async def test_image_from_url_fails(
|
|||
|
||||
state = hass.states.get("image.test")
|
||||
|
||||
# The image failed to load, the the last image update is registered
|
||||
# The image failed to load, the last image update is registered
|
||||
# but _last_image was set to `None`
|
||||
assert state.state == "2023-04-01T00:00:00+00:00"
|
||||
client = await hass_client_no_auth()
|
||||
|
|
|
@ -456,7 +456,7 @@ def test_rename_entity_collision(
|
|||
) -> None:
|
||||
"""Test statistics is migrated when entity_id is changed.
|
||||
|
||||
This test relies on the the safeguard in the statistics_meta_manager
|
||||
This test relies on the safeguard in the statistics_meta_manager
|
||||
and should not hit the filter_unique_constraint_integrity_error safeguard.
|
||||
"""
|
||||
hass = hass_recorder()
|
||||
|
|
|
@ -1 +1 @@
|
|||
"""Tests for the the Reddit component."""
|
||||
"""Tests for the Reddit component."""
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
},
|
||||
"metadata": {
|
||||
"inclusion": "Classic Inclusion To A Z-Wave Network\nFor older controllers Classic Inclusion is supported. Depending on the age of the controller the controller will need to be 3 to 35 feet from the device when including.\n1. To enter programming mode, hold the button for 7 seconds. The status light will turn amber, release and the status light will blink.\n2. Follow the Z-Wave controller instructions to enter inclusion mode.\n3. Tap the top or the paddle of the paddle one time. The status light will quickly flash green.\n4. The Z-Wave controller will confirm successful inclusion to the network",
|
||||
"exclusion": "Exclusion From A Z-Wave Network\nWhen removing an fan speed controller from a Z-Wave network,\nbest practice is to use the exclusion command found in the Z-Wave\ncontroller.\n1. To enter programming mode, hold the button for 7 seconds. The\nstatus light will turn amber, release and the status light will blink.\n2. Follow Z-Wave controller directions to enter exclusion mode\n3. Tap the the top of the paddle 1 time. The status light will quickly\nflash green.\n4. The Z-Wave controller will remove the device from the network",
|
||||
"exclusion": "Exclusion From A Z-Wave Network\nWhen removing an fan speed controller from a Z-Wave network,\nbest practice is to use the exclusion command found in the Z-Wave\ncontroller.\n1. To enter programming mode, hold the button for 7 seconds. The\nstatus light will turn amber, release and the status light will blink.\n2. Follow Z-Wave controller directions to enter exclusion mode\n3. Tap the top of the paddle 1 time. The status light will quickly\nflash green.\n4. The Z-Wave controller will remove the device from the network",
|
||||
"reset": "Factory Default\nWhen removing a fan speed controller from a network it is best\npractice to use the exclusion process. In situations where a device\nneeds to be returned to factory default follow the following steps. A\nreset should only be used when a controller is\ninoperable or missing.\n1. Hold the top of the paddle for 7 seconds, the status light will turn amber.\nContinue holding the top paddle for another 7 seconds (total of 14 seconds).\nThe status light will quickly flash red/ amber.\n2. Release the top of the paddle and the device will reset",
|
||||
"manual": "https://products.z-wavealliance.org/ProductManual/File?folder=&filename=product_documents/3832/Draft%20ZW4SF%203-25-20.pdf"
|
||||
}
|
||||
|
|
|
@ -1591,7 +1591,7 @@ def test_config_entry_only_schema_cant_find_module() -> None:
|
|||
def test_config_entry_only_schema_no_hass(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test if the the hass context is not set in our context."""
|
||||
"""Test if the hass context is not set in our context."""
|
||||
with patch(
|
||||
"homeassistant.helpers.config_validation.async_get_hass",
|
||||
side_effect=HomeAssistantError,
|
||||
|
|
Loading…
Add table
Reference in a new issue