Skip to content

Commit

Permalink
Metaclass already specified in base Device class.
Browse files Browse the repository at this point in the history
No need to specify it in subclasses.
  • Loading branch information
yawor committed Feb 5, 2018
1 parent d948947 commit 1d0d399
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions miio/airpurifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from functools import wraps
import click
from .device import Device, DeviceException
from .click_common import DeviceGroupMeta, device_command, echo_return_status
from .click_common import device_command, echo_return_status

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -326,7 +326,7 @@ def __repr__(self) -> str:
return s


class AirPurifier(Device, metaclass=DeviceGroupMeta):
class AirPurifier(Device):
"""Main class representing the air purifier."""

@device_command(
Expand Down
6 changes: 2 additions & 4 deletions miio/plug.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
from typing import Dict, Any, Optional
from collections import defaultdict
from .device import Device
from .click_common import (
DeviceGroupMeta, device_command, echo_return_status
)
from .click_common import device_command, echo_return_status

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -37,7 +35,7 @@ def __str__(self) -> str:
return s


class Plug(Device, metaclass=DeviceGroupMeta):
class Plug(Device):
"""Main class representing the smart wifi socket / plug."""

@device_command(
Expand Down
4 changes: 2 additions & 2 deletions miio/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
SoundStatus, SoundInstallStatus)
from .device import Device, DeviceException
from .click_common import (
DeviceGroup, DeviceGroupMeta, device_command, GlobalContextObject
DeviceGroup, device_command, GlobalContextObject
)

_LOGGER = logging.getLogger(__name__)
Expand All @@ -37,7 +37,7 @@ class Consumable(enum.Enum):
SensorDirty = "sensor_dirty_time"


class Vacuum(Device, metaclass=DeviceGroupMeta):
class Vacuum(Device):
"""Main class representing the vacuum."""

def __init__(self, ip: str, token: str = None, start_id: int = 0,
Expand Down

0 comments on commit 1d0d399

Please sign in to comment.