Flake8 35 (#11972)
* Upgrade flake8 to 3.5 * Fix flake8 bare except errors * Make flake8 and pylint cooperate
This commit is contained in:
1 parent
5426e5c875
commit
78a3c01f27
12 files changed
+15
-21
No files matched your search
@@ -87,10 +87,9 @@ class TestEmulatedHue(unittest.TestCase):
|
||||
self.assertTrue('text/xml' in result.headers['content-type'])
|
||||
|
||||
# Make sure the XML is parsable
|
||||
# pylint: disable=bare-except
|
||||
try:
|
||||
ET.fromstring(result.text)
|
||||
except:
|
||||
except: # noqa: E722 # pylint: disable=bare-except
|
||||
self.fail('description.xml is not valid XML!')
|
||||
|
||||
def test_create_username(self):
|
||||
|
||||
@@ -34,7 +34,7 @@ def get_error_log(hass, test_client, expected_count):
|
||||
def _generate_and_log_exception(exception, log):
|
||||
try:
|
||||
raise Exception(exception)
|
||||
except: # pylint: disable=bare-except
|
||||
except: # noqa: E722 # pylint: disable=bare-except
|
||||
_LOGGER.exception(log)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user