mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Pylint 2 useless-return fixes (#15677)
This commit is contained in:
parent
95dc06cca6
commit
1c42caba76
@ -50,7 +50,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
HeatmiserV3Thermostat(
|
HeatmiserV3Thermostat(
|
||||||
heatmiser, tstat.get(CONF_ID), tstat.get(CONF_NAME), serport)
|
heatmiser, tstat.get(CONF_ID), tstat.get(CONF_NAME), serport)
|
||||||
])
|
])
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
class HeatmiserV3Thermostat(ClimateDevice):
|
class HeatmiserV3Thermostat(ClimateDevice):
|
||||||
|
@ -253,5 +253,3 @@ def async_handle_cloud(hass, cloud, payload):
|
|||||||
payload['reason'])
|
payload['reason'])
|
||||||
else:
|
else:
|
||||||
_LOGGER.warning("Received unknown cloud action: %s", action)
|
_LOGGER.warning("Received unknown cloud action: %s", action)
|
||||||
|
|
||||||
return None
|
|
||||||
|
@ -31,7 +31,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
ccb = hass.data[DOMAIN]
|
ccb = hass.data[DOMAIN]
|
||||||
|
|
||||||
add_devices([ComfoConnectFan(hass, name=ccb.name, ccb=ccb)], True)
|
add_devices([ComfoConnectFan(hass, name=ccb.name, ccb=ccb)], True)
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
class ComfoConnectFan(FanEntity):
|
class ComfoConnectFan(FanEntity):
|
||||||
|
@ -48,4 +48,3 @@ class MailgunReceiveMessageView(HomeAssistantView):
|
|||||||
hass = request.app['hass']
|
hass = request.app['hass']
|
||||||
data = yield from request.post()
|
data = yield from request.post()
|
||||||
hass.bus.async_fire(MESSAGE_RECEIVED, dict(data))
|
hass.bus.async_fire(MESSAGE_RECEIVED, dict(data))
|
||||||
return
|
|
||||||
|
@ -110,6 +110,5 @@ def send_message(sender, password, recipient, use_tls,
|
|||||||
def discard_ssl_invalid_cert(event):
|
def discard_ssl_invalid_cert(event):
|
||||||
"""Do nothing if ssl certificate is invalid."""
|
"""Do nothing if ssl certificate is invalid."""
|
||||||
_LOGGER.info('Ignoring invalid ssl certificate as requested.')
|
_LOGGER.info('Ignoring invalid ssl certificate as requested.')
|
||||||
return
|
|
||||||
|
|
||||||
SendNotificationBot()
|
SendNotificationBot()
|
||||||
|
@ -187,7 +187,6 @@ class FritzBoxCallMonitor:
|
|||||||
line = response.split("\n", 1)[0]
|
line = response.split("\n", 1)[0]
|
||||||
self._parse(line)
|
self._parse(line)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
return
|
|
||||||
|
|
||||||
def _parse(self, line):
|
def _parse(self, line):
|
||||||
"""Parse the call information and set the sensor states."""
|
"""Parse the call information and set the sensor states."""
|
||||||
|
@ -95,7 +95,6 @@ class ModemCalleridSensor(Entity):
|
|||||||
if self.modem:
|
if self.modem:
|
||||||
self.modem.close()
|
self.modem.close()
|
||||||
self.modem = None
|
self.modem = None
|
||||||
return
|
|
||||||
|
|
||||||
def _incomingcallcallback(self, newstate):
|
def _incomingcallcallback(self, newstate):
|
||||||
"""Handle new states."""
|
"""Handle new states."""
|
||||||
@ -117,4 +116,3 @@ class ModemCalleridSensor(Entity):
|
|||||||
elif newstate == self.modem.STATE_IDLE:
|
elif newstate == self.modem.STATE_IDLE:
|
||||||
self._state = STATE_IDLE
|
self._state = STATE_IDLE
|
||||||
self.schedule_update_ha_state()
|
self.schedule_update_ha_state()
|
||||||
return
|
|
||||||
|
@ -57,7 +57,6 @@ def disable_c_asyncio() -> None:
|
|||||||
def __init__(self, path_entry: str) -> None:
|
def __init__(self, path_entry: str) -> None:
|
||||||
if path_entry != self.PATH_TRIGGER:
|
if path_entry != self.PATH_TRIGGER:
|
||||||
raise ImportError()
|
raise ImportError()
|
||||||
return
|
|
||||||
|
|
||||||
def find_module(self, fullname: str, path: Any = None) -> None:
|
def find_module(self, fullname: str, path: Any = None) -> None:
|
||||||
"""Find a module."""
|
"""Find a module."""
|
||||||
@ -65,7 +64,6 @@ def disable_c_asyncio() -> None:
|
|||||||
# We lint in Py35, exception is introduced in Py36
|
# We lint in Py35, exception is introduced in Py36
|
||||||
# pylint: disable=undefined-variable
|
# pylint: disable=undefined-variable
|
||||||
raise ModuleNotFoundError() # type: ignore # noqa
|
raise ModuleNotFoundError() # type: ignore # noqa
|
||||||
return None
|
|
||||||
|
|
||||||
sys.path_hooks.append(AsyncioImportFinder)
|
sys.path_hooks.append(AsyncioImportFinder)
|
||||||
sys.path.insert(0, AsyncioImportFinder.PATH_TRIGGER)
|
sys.path.insert(0, AsyncioImportFinder.PATH_TRIGGER)
|
||||||
|
@ -156,7 +156,6 @@ def fire_coroutine_threadsafe(coro: Coroutine,
|
|||||||
ensure_future(coro, loop=loop)
|
ensure_future(coro, loop=loop)
|
||||||
|
|
||||||
loop.call_soon_threadsafe(callback)
|
loop.call_soon_threadsafe(callback)
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
def run_callback_threadsafe(loop: AbstractEventLoop, callback: Callable,
|
def run_callback_threadsafe(loop: AbstractEventLoop, callback: Callable,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user