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

+1 -1
View File
@@ -89,7 +89,7 @@ class TestEmulatedHue(unittest.TestCase):
# Make sure the XML is parsable
try:
ET.fromstring(result.text)
except: # noqa: E722 # pylint: disable=bare-except
except: # noqa: E722 pylint: disable=bare-except
self.fail('description.xml is not valid XML!')
def test_create_username(self):
+1 -1
View File
@@ -28,7 +28,7 @@ async def get_error_log(hass, aiohttp_client, expected_count):
def _generate_and_log_exception(exception, log):
try:
raise Exception(exception)
except: # noqa: E722 # pylint: disable=bare-except
except: # noqa: E722 pylint: disable=bare-except
_LOGGER.exception(log)