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

+2 -2
View File
@@ -189,7 +189,7 @@ class StoredData(object):
with self._lock, open(self._data_file, 'rb') as myfile:
self._data = pickle.load(myfile) or {}
self._cache_outdated = False
except: # noqa: E722 # pylint: disable=bare-except
except: # noqa: E722 pylint: disable=bare-except
_LOGGER.error("Error loading data from pickled file %s",
self._data_file)
@@ -207,7 +207,7 @@ class StoredData(object):
feed_id, self._data_file)
try:
pickle.dump(self._data, myfile)
except: # noqa: E722 # pylint: disable=bare-except
except: # noqa: E722 pylint: disable=bare-except
_LOGGER.error(
"Error saving pickled data to %s", self._data_file)
self._cache_outdated = True