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:
Teemu R 2017-10-07 17:41:51 +02:00 committed by GitHub
parent d22eceefae
commit 0b2e371e79
4 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -1,5 +0,0 @@
class SmartDeviceException(Exception):
"""
SmartDeviceException gets raised for errors reported by the plug.
"""
pass