Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
27219b6962
commit
6bb4e7d62c
1044 changed files with 24245 additions and 16750 deletions
|
@ -209,9 +209,11 @@ def soco_factory(
|
|||
factory = SoCoMockFactory(
|
||||
music_library, speaker_info, current_track_info_empty, battery_info, alarm_clock
|
||||
)
|
||||
with patch("homeassistant.components.sonos.SoCo", new=factory.get_mock), patch(
|
||||
"socket.gethostbyname", side_effect=patch_gethostbyname
|
||||
), patch("homeassistant.components.sonos.ZGS_SUBSCRIPTION_TIMEOUT", 0):
|
||||
with (
|
||||
patch("homeassistant.components.sonos.SoCo", new=factory.get_mock),
|
||||
patch("socket.gethostbyname", side_effect=patch_gethostbyname),
|
||||
patch("homeassistant.components.sonos.ZGS_SUBSCRIPTION_TIMEOUT", 0),
|
||||
):
|
||||
yield factory
|
||||
|
||||
|
||||
|
@ -224,14 +226,16 @@ def soco_fixture(soco_factory):
|
|||
@pytest.fixture(autouse=True)
|
||||
async def silent_ssdp_scanner(hass):
|
||||
"""Start SSDP component and get Scanner, prevent actual SSDP traffic."""
|
||||
with patch(
|
||||
"homeassistant.components.ssdp.Scanner._async_start_ssdp_listeners"
|
||||
), patch("homeassistant.components.ssdp.Scanner._async_stop_ssdp_listeners"), patch(
|
||||
"homeassistant.components.ssdp.Scanner.async_scan"
|
||||
), patch(
|
||||
"homeassistant.components.ssdp.Server._async_start_upnp_servers",
|
||||
), patch(
|
||||
"homeassistant.components.ssdp.Server._async_stop_upnp_servers",
|
||||
with (
|
||||
patch("homeassistant.components.ssdp.Scanner._async_start_ssdp_listeners"),
|
||||
patch("homeassistant.components.ssdp.Scanner._async_stop_ssdp_listeners"),
|
||||
patch("homeassistant.components.ssdp.Scanner.async_scan"),
|
||||
patch(
|
||||
"homeassistant.components.ssdp.Server._async_start_upnp_servers",
|
||||
),
|
||||
patch(
|
||||
"homeassistant.components.ssdp.Server._async_stop_upnp_servers",
|
||||
),
|
||||
):
|
||||
yield
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue