Remove globally disabled pylint issue and update docstrings (#7111)
This commit is contained in:
parent
b0ffc55cfa
commit
c43a3efabd
1 changed files with 3 additions and 4 deletions
|
@ -22,20 +22,20 @@ URL = '/api/locative'
|
||||||
|
|
||||||
|
|
||||||
def setup_scanner(hass, config, see, discovery_info=None):
|
def setup_scanner(hass, config, see, discovery_info=None):
|
||||||
"""Setup an endpoint for the Locative application."""
|
"""Set up an endpoint for the Locative application."""
|
||||||
hass.http.register_view(LocativeView(see))
|
hass.http.register_view(LocativeView(see))
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class LocativeView(HomeAssistantView):
|
class LocativeView(HomeAssistantView):
|
||||||
"""View to handle locative requests."""
|
"""View to handle Locative requests."""
|
||||||
|
|
||||||
url = URL
|
url = URL
|
||||||
name = 'api:locative'
|
name = 'api:locative'
|
||||||
|
|
||||||
def __init__(self, see):
|
def __init__(self, see):
|
||||||
"""Initialize Locative url endpoints."""
|
"""Initialize Locative URL endpoints."""
|
||||||
self.see = see
|
self.see = see
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
@ -52,7 +52,6 @@ class LocativeView(HomeAssistantView):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
# pylint: disable=too-many-return-statements
|
|
||||||
def _handle(self, hass, data):
|
def _handle(self, hass, data):
|
||||||
"""Handle locative request."""
|
"""Handle locative request."""
|
||||||
if 'latitude' not in data or 'longitude' not in data:
|
if 'latitude' not in data or 'longitude' not in data:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue