mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-07 19:24:01 +00:00
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
This commit is contained in:
@@ -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:
|
||||
"""
|
||||
|
6
tox.ini
6
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__
|
||||
|
Reference in New Issue
Block a user