1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

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:
Joost Lekkerkerker
2024-03-26 00:02:16 +01:00
committed by GitHub
parent 27219b6962
commit 6bb4e7d62c
1044 changed files with 24245 additions and 16750 deletions

View File

@@ -30,8 +30,9 @@ async def test_full_flow(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> No
assert result["type"] == FlowResultType.FORM
assert result["step_id"] == "user"
with patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"), patch(
"homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"
with (
patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"),
patch("homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"),
):
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
@@ -77,8 +78,9 @@ async def test_flow_failure(
assert result["type"] == FlowResultType.FORM
assert result["errors"] == {"base": text_error}
with patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"), patch(
"homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"
with (
patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"),
patch("homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"),
):
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
@@ -102,8 +104,9 @@ async def test_flow_incorrect_guid(
assert result["type"] == FlowResultType.FORM
assert result["step_id"] == "user"
with patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"), patch(
"homeassistant.components.lutron.config_flow.Lutron.guid", "12345"
with (
patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"),
patch("homeassistant.components.lutron.config_flow.Lutron.guid", "12345"),
):
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
@@ -113,8 +116,9 @@ async def test_flow_incorrect_guid(
assert result["type"] == FlowResultType.FORM
assert result["errors"] == {"base": "cannot_connect"}
with patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"), patch(
"homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"
with (
patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"),
patch("homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"),
):
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
@@ -149,8 +153,9 @@ async def test_import(
mock_setup_entry: AsyncMock,
) -> None:
"""Test import flow."""
with patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"), patch(
"homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"
with (
patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"),
patch("homeassistant.components.lutron.config_flow.Lutron.guid", "12345678901"),
):
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=MOCK_DATA_IMPORT
@@ -189,8 +194,9 @@ async def test_import_flow_failure(
async def test_import_flow_guid_failure(hass: HomeAssistant) -> None:
"""Test handling errors while importing."""
with patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"), patch(
"homeassistant.components.lutron.config_flow.Lutron.guid", "123"
with (
patch("homeassistant.components.lutron.config_flow.Lutron.load_xml_db"),
patch("homeassistant.components.lutron.config_flow.Lutron.guid", "123"),
):
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_IMPORT}, data=MOCK_DATA_IMPORT