mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
move SmartDeviceException to SmartDevice, and remove types.py complet… (#95)
* move SmartDeviceException to SmartDevice, and remove types.py completely. fixes #94 * do not import skipIf anymore
This commit is contained in:
parent
d22eceefae
commit
0b2e371e79
@ -13,9 +13,8 @@ Module-specific errors are raised as `SmartDeviceException` and are expected
|
||||
to be handled by the user of the library.
|
||||
"""
|
||||
# flake8: noqa
|
||||
from .smartdevice import SmartDevice
|
||||
from .smartdevice import SmartDevice, SmartDeviceException
|
||||
from .smartplug import SmartPlug
|
||||
from .types import SmartDeviceException
|
||||
from .smartbulb import SmartBulb
|
||||
from .protocol import TPLinkSmartHomeProtocol
|
||||
from .discover import Discover
|
||||
|
@ -20,12 +20,18 @@ import warnings
|
||||
from collections import defaultdict
|
||||
from typing import Any, Dict, List, Tuple, Optional
|
||||
|
||||
from .types import SmartDeviceException
|
||||
from .protocol import TPLinkSmartHomeProtocol
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SmartDeviceException(Exception):
|
||||
"""
|
||||
SmartDeviceException gets raised for errors reported by device.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class SmartDevice(object):
|
||||
# possible device features
|
||||
FEATURE_ENERGY_METER = 'ENE'
|
||||
|
@ -1,4 +1,4 @@
|
||||
from unittest import TestCase, skip, skipIf
|
||||
from unittest import TestCase, skip
|
||||
from voluptuous import Schema, Invalid, All, Any, Range, Coerce
|
||||
from functools import partial
|
||||
import datetime
|
||||
|
@ -1,5 +0,0 @@
|
||||
class SmartDeviceException(Exception):
|
||||
"""
|
||||
SmartDeviceException gets raised for errors reported by the plug.
|
||||
"""
|
||||
pass
|
Loading…
Reference in New Issue
Block a user