Pylint 2 useless-return fixes (#15677)
parent
95dc06cca6
commit
1c42caba76
|
@ -50,7 +50,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
HeatmiserV3Thermostat(
|
||||
heatmiser, tstat.get(CONF_ID), tstat.get(CONF_NAME), serport)
|
||||
])
|
||||
return
|
||||
|
||||
|
||||
class HeatmiserV3Thermostat(ClimateDevice):
|
||||
|
|
|
@ -253,5 +253,3 @@ def async_handle_cloud(hass, cloud, payload):
|
|||
payload['reason'])
|
||||
else:
|
||||
_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]
|
||||
|
||||
add_devices([ComfoConnectFan(hass, name=ccb.name, ccb=ccb)], True)
|
||||
return
|
||||
|
||||
|
||||
class ComfoConnectFan(FanEntity):
|
||||
|
|
|
@ -48,4 +48,3 @@ class MailgunReceiveMessageView(HomeAssistantView):
|
|||
hass = request.app['hass']
|
||||
data = yield from request.post()
|
||||
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):
|
||||
"""Do nothing if ssl certificate is invalid."""
|
||||
_LOGGER.info('Ignoring invalid ssl certificate as requested.')
|
||||
return
|
||||
|
||||
SendNotificationBot()
|
||||
|
|
|
@ -187,7 +187,6 @@ class FritzBoxCallMonitor:
|
|||
line = response.split("\n", 1)[0]
|
||||
self._parse(line)
|
||||
time.sleep(1)
|
||||
return
|
||||
|
||||
def _parse(self, line):
|
||||
"""Parse the call information and set the sensor states."""
|
||||
|
|
|
@ -95,7 +95,6 @@ class ModemCalleridSensor(Entity):
|
|||
if self.modem:
|
||||
self.modem.close()
|
||||
self.modem = None
|
||||
return
|
||||
|
||||
def _incomingcallcallback(self, newstate):
|
||||
"""Handle new states."""
|
||||
|
@ -117,4 +116,3 @@ class ModemCalleridSensor(Entity):
|
|||
elif newstate == self.modem.STATE_IDLE:
|
||||
self._state = STATE_IDLE
|
||||
self.schedule_update_ha_state()
|
||||
return
|
||||
|
|
|
@ -57,7 +57,6 @@ def disable_c_asyncio() -> None:
|
|||
def __init__(self, path_entry: str) -> None:
|
||||
if path_entry != self.PATH_TRIGGER:
|
||||
raise ImportError()
|
||||
return
|
||||
|
||||
def find_module(self, fullname: str, path: Any = None) -> None:
|
||||
"""Find a module."""
|
||||
|
@ -65,7 +64,6 @@ def disable_c_asyncio() -> None:
|
|||
# We lint in Py35, exception is introduced in Py36
|
||||
# pylint: disable=undefined-variable
|
||||
raise ModuleNotFoundError() # type: ignore # noqa
|
||||
return None
|
||||
|
||||
sys.path_hooks.append(AsyncioImportFinder)
|
||||
sys.path.insert(0, AsyncioImportFinder.PATH_TRIGGER)
|
||||
|
|
|
@ -156,7 +156,6 @@ def fire_coroutine_threadsafe(coro: Coroutine,
|
|||
ensure_future(coro, loop=loop)
|
||||
|
||||
loop.call_soon_threadsafe(callback)
|
||||
return
|
||||
|
||||
|
||||
def run_callback_threadsafe(loop: AbstractEventLoop, callback: Callable,
|
||||
|
|
Loading…
Reference in New Issue