From 189029b199182c30ff9f8807db72e6f39a442d3d Mon Sep 17 00:00:00 2001 From: Teemu R Date: Fri, 19 Oct 2018 17:08:00 +0200 Subject: [PATCH] Remove deprecated identify, this has been deprecated for long enough. (#136) * Remove deprecated identify, this has been deprecated for long enough. * ignore abstract methods and __repr__ from coverage --- pyHS100/smartdevice.py | 21 --------------------- tox.ini | 6 ++++++ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/pyHS100/smartdevice.py b/pyHS100/smartdevice.py index 90d9723a..778b8814 100644 --- a/pyHS100/smartdevice.py +++ b/pyHS100/smartdevice.py @@ -186,27 +186,6 @@ class SmartDevice(object): """ return self._query_helper("system", "get_sysinfo") - def identify(self) -> Tuple[str, str, Any]: - """ - Query device information to identify model and featureset - - :return: (alias, model, list of supported features) - :rtype: tuple - """ - warnings.simplefilter('always', DeprecationWarning) - warnings.warn( - "use alias and model instead of idenfity()", - DeprecationWarning, - stacklevel=2 - ) - warnings.simplefilter('default', DeprecationWarning) - - info = self.sys_info - - # TODO sysinfo parsing should happen in sys_info - # to avoid calling fetch here twice.. - return info["alias"], info["model"], self.features - @property def model(self) -> str: """ diff --git a/tox.ini b/tox.ini index 25774466..522a1f89 100644 --- a/tox.ini +++ b/tox.ini @@ -36,3 +36,9 @@ branch = True omit = pyHS100/cli.py pyHS100/tests/* + +[coverage:report] +exclude_lines = + # ignore abstract methods + raise NotImplementedError + def __repr__