Pylint 2 fixes (#15487)

* pylint 2 inline disable syntax fixes

* pylint 2 logging-not-lazy fixes

* pylint 2 consider-using-in fixes

* Revert pylint 2 inline disable syntax fixes addressing unused-imports

Will have a go at removing more unused imports altogether first.
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-07-17 19:34:29 +02:00
1 parent d2f4bce6c0
commit e31dd4404e
33 files changed
+55 -73

No files matched your search

@@ -102,7 +102,7 @@ class TomatoDeviceScanner(DeviceScanner):
for param, value in \
self.parse_api_pattern.findall(response.text):
if param == 'wldev' or param == 'dhcpd_lease':
if param in ('wldev', 'dhcpd_lease'):
self.last_results[param] = \
json.loads(value.replace("'", '"'))
return True
@@ -56,7 +56,7 @@ def _refresh_on_access_denied(func):
try:
return func(self, *args, **kwargs)
except PermissionError:
_LOGGER.warning("Invalid session detected." +
_LOGGER.warning("Invalid session detected."
" Trying to refresh session_id and re-run RPC")
self.session_id = _get_session_id(
self.url, self.username, self.password)