Skip to content

Commit

Permalink
Revert "Fix cyclic import linting error"
Browse files Browse the repository at this point in the history
This reverts commit 7a13585.
  • Loading branch information
natekspencer committed Mar 4, 2024
1 parent 07add55 commit 00a0b5a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions vivintpy/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,20 @@

if TYPE_CHECKING:
from .alarm_panel import AlarmPanel

DEVICE = "device"


def get_device_class(device_type: str) -> Type[VivintDevice]:
"""Map a device_type string to the class that implements that device."""
# pylint: disable=import-outside-toplevel
from .camera import Camera
from .door_lock import DoorLock
from .garage_door import GarageDoor
from .switch import BinarySwitch, MultilevelSwitch
from .thermostat import Thermostat
from .wireless_sensor import WirelessSensor

DEVICE = "device"


def get_device_class(device_type: str) -> Type[VivintDevice]:
"""Map a device_type string to the class that implements that device."""
mapping: dict[DeviceType, Type[VivintDevice]] = {
DeviceType.BINARY_SWITCH: BinarySwitch,
DeviceType.CAMERA: Camera,
Expand Down

0 comments on commit 00a0b5a

Please sign in to comment.