mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
@@ -47,12 +47,14 @@ def mock_operating_system_90():
|
||||
def macos_adapter():
|
||||
"""Fixture that mocks the macos adapter."""
|
||||
with patch("bleak.get_platform_scanner_backend_type"), patch(
|
||||
"homeassistant.components.bluetooth.platform.system", return_value="Darwin"
|
||||
"homeassistant.components.bluetooth.platform.system",
|
||||
return_value="Darwin",
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.scanner.platform.system",
|
||||
return_value="Darwin",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.platform.system", return_value="Darwin"
|
||||
"bluetooth_adapters.systems.platform.system",
|
||||
return_value="Darwin",
|
||||
):
|
||||
yield
|
||||
|
||||
@@ -71,14 +73,16 @@ def windows_adapter():
|
||||
def no_adapter_fixture():
|
||||
"""Fixture that mocks no adapters on Linux."""
|
||||
with patch(
|
||||
"homeassistant.components.bluetooth.platform.system", return_value="Linux"
|
||||
"homeassistant.components.bluetooth.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.scanner.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.platform.system", return_value="Linux"
|
||||
"bluetooth_adapters.systems.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.refresh"
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.refresh",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.adapters",
|
||||
{},
|
||||
@@ -90,14 +94,16 @@ def no_adapter_fixture():
|
||||
def one_adapter_fixture():
|
||||
"""Fixture that mocks one adapter on Linux."""
|
||||
with patch(
|
||||
"homeassistant.components.bluetooth.platform.system", return_value="Linux"
|
||||
"homeassistant.components.bluetooth.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.scanner.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.platform.system", return_value="Linux"
|
||||
"bluetooth_adapters.systems.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.refresh"
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.refresh",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.adapters",
|
||||
{
|
||||
@@ -124,9 +130,7 @@ def two_adapters_fixture():
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.scanner.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.platform.system", return_value="Linux"
|
||||
), patch(
|
||||
), patch("bluetooth_adapters.systems.platform.system", return_value="Linux"), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.refresh"
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.adapters",
|
||||
@@ -166,9 +170,7 @@ def one_adapter_old_bluez():
|
||||
), patch(
|
||||
"homeassistant.components.bluetooth.scanner.platform.system",
|
||||
return_value="Linux",
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.platform.system", return_value="Linux"
|
||||
), patch(
|
||||
), patch("bluetooth_adapters.systems.platform.system", return_value="Linux"), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.refresh"
|
||||
), patch(
|
||||
"bluetooth_adapters.systems.linux.LinuxAdapters.adapters",
|
||||
|
||||
Reference in New Issue
Block a user