Prevent import from syrupy.SnapshotAssertion (#145208)

This commit is contained in:
epenet
2025-05-19 14:18:35 +02:00
committed by GitHub
parent 0c0c61f9e0
commit 9d050360c8
44 changed files with 44 additions and 43 deletions

View File

@ -2,7 +2,7 @@
from unittest.mock import AsyncMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, patch
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.number import (
ATTR_VALUE,

View File

@ -2,7 +2,7 @@
from unittest.mock import AsyncMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant

View File

@ -2,7 +2,7 @@
from unittest.mock import AsyncMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant

View File

@ -4,7 +4,7 @@ import datetime
from unittest.mock import Mock
from freezegun.api import FrozenDateTimeFactory
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from yalexs.pubnub_async import AugustPubNub
from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN

View File

@ -6,7 +6,7 @@ from unittest.mock import Mock
from aiohttp import ClientResponseError
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from yalexs.manager.activity import INITIAL_LOCK_RESYNC_TIME
from yalexs.pubnub_async import AugustPubNub

View File

@ -1,7 +1,7 @@
"""Test the CO2Signal diagnostics."""
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.core import HomeAssistant

View File

@ -11,7 +11,7 @@ from aioelectricitymaps import (
)
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er

View File

@ -4,7 +4,7 @@ from unittest.mock import MagicMock
from easyenergy import EasyEnergyNoDataError
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.homeassistant import SERVICE_UPDATE_ENTITY
from homeassistant.const import ATTR_ENTITY_ID

View File

@ -5,7 +5,7 @@ from __future__ import annotations
from unittest.mock import AsyncMock
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant import config_entries
from homeassistant.components.mold_indicator.const import (

View File

@ -5,7 +5,7 @@ from unittest.mock import MagicMock, patch
from freezegun.api import FrozenDateTimeFactory
from ohme import ChargerStatus
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.const import (

View File

@ -2,7 +2,7 @@
from unittest.mock import MagicMock
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant

View File

@ -2,7 +2,7 @@
from unittest.mock import MagicMock
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.ohme.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState

View File

@ -2,7 +2,7 @@
from unittest.mock import MagicMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.number import (
ATTR_VALUE,

View File

@ -3,7 +3,7 @@
from unittest.mock import AsyncMock, MagicMock, patch
from ohme import ChargerMode
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import STATE_UNAVAILABLE, Platform
from homeassistant.core import HomeAssistant

View File

@ -6,7 +6,7 @@ from unittest.mock import MagicMock, patch
from freezegun.api import FrozenDateTimeFactory
from ohme import ApiException
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import STATE_UNAVAILABLE, Platform
from homeassistant.core import HomeAssistant

View File

@ -2,7 +2,7 @@
from unittest.mock import AsyncMock, MagicMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.switch import (
DOMAIN as SWITCH_DOMAIN,

View File

@ -2,7 +2,7 @@
from unittest.mock import MagicMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.time import (
ATTR_TIME,

View File

@ -2,7 +2,7 @@
from unittest.mock import AsyncMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant

View File

@ -2,7 +2,7 @@
from unittest.mock import AsyncMock, patch
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant

View File

@ -1,6 +1,6 @@
"""Tests for the diagnostics data provided by the RDW integration."""
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.core import HomeAssistant

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, DeviceEvent, DeviceHealthEvent
from pysmartthings.models import HealthStatus
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.smartthings.const import MAIN
from homeassistant.const import Platform

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components import automation, script
from homeassistant.components.automation import automations_with_entity

View File

@ -6,7 +6,7 @@ from freezegun.api import FrozenDateTimeFactory
from pysmartthings import Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.components.smartthings import MAIN

View File

@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, call
from pysmartthings import Attribute, Capability, Command, Status
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.climate import (
ATTR_CURRENT_HUMIDITY,

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command, Status
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.cover import (
ATTR_CURRENT_POSITION,

View File

@ -3,7 +3,7 @@
from unittest.mock import AsyncMock, patch
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.components.smartthings.const import DOMAIN

View File

@ -6,7 +6,7 @@ from freezegun.api import FrozenDateTimeFactory
from pysmartthings import Attribute, Capability
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.event import ATTR_EVENT_TYPES
from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN, Platform

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.fan import (
ATTR_PERCENTAGE,

View File

@ -13,7 +13,7 @@ from pysmartthings import (
Subscription,
)
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN
from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN, HVACMode

View File

@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, call
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.light import (
ATTR_BRIGHTNESS,

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN, LockState
from homeassistant.components.smartthings.const import MAIN

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command, Status
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.media_player import (
ATTR_INPUT_SOURCE,

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.number import (
ATTR_VALUE,

View File

@ -2,7 +2,7 @@
from unittest.mock import AsyncMock
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON, Platform

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.select import (
ATTR_OPTION,

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components import automation, script
from homeassistant.components.automation import automations_with_entity

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components import automation, script
from homeassistant.components.automation import automations_with_entity

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.smartthings.const import MAIN
from homeassistant.components.update import (

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.smartthings import MAIN
from homeassistant.components.valve import DOMAIN as VALVE_DOMAIN, ValveState

View File

@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, call
from pysmartthings import Attribute, Capability, Command
from pysmartthings.models import HealthStatus
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.smartthings import MAIN
from homeassistant.components.water_heater import (

View File

@ -12,7 +12,7 @@ from synology_dsm.exceptions import (
SynologyDSMLoginInvalidException,
SynologyDSMRequestException,
)
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.synology_dsm.config_flow import CONF_OTP_CODE
from homeassistant.components.synology_dsm.const import (

View File

@ -5,7 +5,7 @@ from typing import Any
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy import SnapshotAssertion
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.components.tag import DOMAIN, _create_entry, async_scan_tag

View File

@ -13,6 +13,7 @@ extend-ignore = [
[lint.flake8-tidy-imports.banned-api]
"async_timeout".msg = "use asyncio.timeout instead"
"pytz".msg = "use zoneinfo instead"
"syrupy.SnapshotAssertion".msg = "use syrupy.assertion.SnapshotAssertion instead"
[lint.isort]
known-first-party = [