8000 Pylint 2 useless-return fixes by scop · Pull Request #15677 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Pylint 2 useless-return fixes #15677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion homeassistant/components/climate/heatmiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/cloud/iot.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,3 @@ def async_handle_cloud(hass, cloud, payload):
payload['reason'])
else:
_LOGGER.warning("Received unknown cloud action: %s", action)

return None
1 change: 0 additions & 1 deletion homeassistant/components/fan/comfoconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/mailgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ def post(self, request): # pylint: disable=no-self-use
hass = request.app['hass']
data = yield from request.post()
hass.bus.async_fire(MESSAGE_RECEIVED, dict(data))
return
1 change: 0 additions & 1 deletion homeassistant/components/notify/xmpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,5 @@ def check_credentials(self, event):
def discard_ssl_invalid_cert(event):
"""Do nothing if ssl certificate is invalid."""
_LOGGER.info('Ignoring invalid ssl certificate as requested.')
return

SendNotificationBot()
1 change: 0 additions & 1 deletion homeassistant/components/sensor/fritzbox_callmonitor.py
< 8000 /div>
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def _listen(self):
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."""
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/sensor/modem_callerid.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def _stop_modem(self, event):
if self.modem:
self.modem.close()
self.modem = None
return

def _incomingcallcallback(self, newstate):
"""Handle new states."""
Expand All @@ -117,4 +116,3 @@ def _incomingcallcallback(self, newstate):
elif newstate == self.modem.STATE_IDLE:
self._state = STATE_IDLE
self.schedule_update_ha_state()
return
2 changes: 0 additions & 2 deletions homeassistant/monkey_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@ class AsyncioImportFinder:
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."""
if fullname == self.PATH_TRIGGER:
# 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)
Expand Down
1 change: 0 additions & 1 deletion homeassistant/util/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def callback() -> None:
ensure_future(coro, loop=loop)

loop.call_soon_threadsafe(callback)
return


def run_callback_threadsafe(loop: AbstractEventLoop, callback: Callable,
Expand Down
155E
0