Skip to content

Commit

Permalink
Export relevant names from backup integration
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHjelmare committed Nov 14, 2024
1 parent 0599983 commit 77719e2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
9 changes: 6 additions & 3 deletions homeassistant/components/backup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
from homeassistant.helpers.hassio import is_hassio
from homeassistant.helpers.typing import ConfigType

from .agent import BackupAgent, UploadedBackup
from .agent import BackupAgent, BackupAgentPlatformProtocol, UploadedBackup
from .const import DOMAIN, LOGGER
from .http import async_register_http_views
from .manager import BackupManager
from .models import BackupUploadMetadata
from .manager import BackupManager, BackupPlatformProtocol
from .models import BackupUploadMetadata, BaseBackup
from .websocket import async_register_websocket_handlers

__all__ = [
"BackupAgent",
"BackupAgentPlatformProtocol",
"BackupPlatformProtocol",
"BackupUploadMetadata",
"BaseBackup",
"UploadedBackup",
]

Expand Down
9 changes: 6 additions & 3 deletions tests/components/backup/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
from typing import Any
from unittest.mock import patch

from homeassistant.components.backup import DOMAIN
from homeassistant.components.backup.agent import BackupAgent, UploadedBackup
from homeassistant.components.backup import (
DOMAIN,
BackupAgent,
BackupUploadMetadata,
UploadedBackup,
)
from homeassistant.components.backup.manager import Backup
from homeassistant.components.backup.models import BackupUploadMetadata
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType
from homeassistant.setup import async_setup_component
Expand Down
9 changes: 5 additions & 4 deletions tests/components/backup/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
from multidict import CIMultiDict, CIMultiDictProxy
import pytest

from homeassistant.components.backup import BackupManager, BackupUploadMetadata
from homeassistant.components.backup.agent import BackupAgentPlatformProtocol
from homeassistant.components.backup.manager import (
from homeassistant.components.backup import (
BackupAgentPlatformProtocol,
BackupManager,
BackupPlatformProtocol,
BackupProgress,
BackupUploadMetadata,
)
from homeassistant.components.backup.manager import BackupProgress
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError
from homeassistant.setup import async_setup_component
Expand Down
2 changes: 1 addition & 1 deletion tests/components/backup/test_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import pytest
from syrupy import SnapshotAssertion

from homeassistant.components.backup import BaseBackup
from homeassistant.components.backup.const import DATA_MANAGER
from homeassistant.components.backup.manager import NewBackup
from homeassistant.components.backup.models import BaseBackup
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError

Expand Down

0 comments on commit 77719e2

Please sign in to comment.