Skip to content

Commit

Permalink
made imports more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
signalkraft committed Feb 23, 2024
1 parent 0d66f37 commit 90ca073
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
3 changes: 2 additions & 1 deletion custom_components/mypyllant/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from custom_components.mypyllant import DOMAIN, SystemCoordinator
from custom_components.mypyllant.const import DOMAIN
from custom_components.mypyllant.coordinator import SystemCoordinator
from custom_components.mypyllant.utils import HolidayEntity, EntityList
from myPyllant.utils import get_default_holiday_dates

Expand Down
3 changes: 2 additions & 1 deletion custom_components/mypyllant/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from custom_components.mypyllant import DOMAIN, SystemCoordinator
from custom_components.mypyllant.const import DOMAIN
from custom_components.mypyllant.coordinator import SystemCoordinator
from custom_components.mypyllant.utils import (
HolidayEntity,
SystemCoordinatorEntity,
Expand Down
3 changes: 2 additions & 1 deletion custom_components/mypyllant/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

from custom_components.mypyllant import DOMAIN, SystemCoordinator
from custom_components.mypyllant.const import DOMAIN
from custom_components.mypyllant.coordinator import SystemCoordinator
from custom_components.mypyllant.utils import (
HolidayEntity,
DomesticHotWaterCoordinatorEntity,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/mypyllant/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from myPyllant.const import DEFAULT_HOLIDAY_DURATION

if typing.TYPE_CHECKING:
from custom_components.mypyllant import SystemCoordinator
from custom_components.mypyllant.coordinator import SystemCoordinator
from myPyllant.models import System, DomesticHotWater, Zone

logger = logging.getLogger(__name__)
Expand Down
3 changes: 2 additions & 1 deletion custom_components/mypyllant/ventilation_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity

from custom_components.mypyllant import SystemCoordinator, DOMAIN
from custom_components.mypyllant.const import DOMAIN
from custom_components.mypyllant.coordinator import SystemCoordinator
from myPyllant.enums import VentilationOperationMode, VentilationFanStageType
from myPyllant.models import System, Ventilation

Expand Down
2 changes: 1 addition & 1 deletion tests/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from homeassistant.helpers.entity_registry import DATA_REGISTRY, EntityRegistry
from homeassistant.loader import DATA_COMPONENTS, DATA_INTEGRATIONS

from custom_components.mypyllant import DOMAIN
from custom_components.mypyllant.const import DOMAIN
from myPyllant.api import MyPyllantAPI
from myPyllant.tests.utils import list_test_data

Expand Down
3 changes: 2 additions & 1 deletion tests/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
from myPyllant.api import MyPyllantAPI
from myPyllant.tests.utils import list_test_data

from custom_components.mypyllant import SystemCoordinator, DOMAIN
from custom_components.mypyllant.const import DOMAIN
from custom_components.mypyllant.coordinator import SystemCoordinator
from custom_components.mypyllant.climate import (
ZoneClimate,
async_setup_entry,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
from myPyllant.api import MyPyllantAPI
from myPyllant.tests.utils import list_test_data

from custom_components.mypyllant import DOMAIN, async_setup_entry, async_unload_entry
from custom_components.mypyllant.const import DOMAIN
from custom_components.mypyllant import async_setup_entry, async_unload_entry
from custom_components.mypyllant.config_flow import DATA_SCHEMA
from tests.conftest import TEST_OPTIONS, MockConfigEntry

_LOGGER = logging.getLogger(__name__)


test_user_input = {
"username": "username",
"password": "password",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from custom_components.mypyllant import (
from custom_components.mypyllant.const import (
SERVICE_GENERATE_TEST_DATA,
SERVICE_EXPORT,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from homeassistant.helpers.entity_registry import DATA_REGISTRY, EntityRegistry
from homeassistant.loader import DATA_COMPONENTS, DATA_INTEGRATIONS

from custom_components.mypyllant import DOMAIN
from custom_components.mypyllant.const import DOMAIN
from myPyllant.api import MyPyllantAPI
from myPyllant.enums import DHWOperationMode
from myPyllant.tests.utils import list_test_data
Expand Down
7 changes: 2 additions & 5 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from unittest import mock


from custom_components.mypyllant import (
DOMAIN,
async_setup_entry,
)
from custom_components.mypyllant.const import DOMAIN
from custom_components.mypyllant import async_setup_entry
from tests.conftest import MockConfigEntry, TEST_OPTIONS
from tests.test_init import test_user_input

Expand Down

0 comments on commit 90ca073

Please sign in to comment.