diff --git a/keystone/tests/fakeldap.py b/keystone/tests/fakeldap.py
index 7ae8d9027..aec86d34c 100644
--- a/keystone/tests/fakeldap.py
+++ b/keystone/tests/fakeldap.py
@@ -41,8 +41,7 @@ SCOPE_NAMES = {
ldap.SCOPE_SUBTREE: 'SCOPE_SUBTREE',
}
-# http://msdn.microsoft.com\
-# /en-us/library/windows/desktop/aa366991(v=vs.85).aspx
+# http://msdn.microsoft.com/en-us/library/windows/desktop/aa366991(v=vs.85).aspx # noqa
CONTROL_TREEDELETE = '1.2.840.113556.1.4.805'
LOG = log.getLogger(__name__)
diff --git a/keystone/tests/test_backend_templated.py b/keystone/tests/test_backend_templated.py
index d5e1b4b4d..eabd69a34 100644
--- a/keystone/tests/test_backend_templated.py
+++ b/keystone/tests/test_backend_templated.py
@@ -67,9 +67,8 @@ class TestTemplatedCatalog(tests.TestCase, test_backend.CatalogTests):
catalog_ref = self.catalog_api.get_catalog('foo', 'bar')
self.assertEqual(2, len(catalog_ref['RegionOne']))
- (self.catalog_api.driver.templates
- ['RegionOne']['compute']['adminURL']) = \
- 'http://localhost:8774/v1.1/$(tenant)s'
+ region = self.catalog_api.driver.templates['RegionOne']
+ region['compute']['adminURL'] = 'http://localhost:8774/v1.1/$(tenant)s'
# the malformed one has been removed
catalog_ref = self.catalog_api.get_catalog('foo', 'bar')
diff --git a/keystone/tests/test_keystoneclient.py b/keystone/tests/test_keystoneclient.py
index 237906f84..8354f4671 100644
--- a/keystone/tests/test_keystoneclient.py
+++ b/keystone/tests/test_keystoneclient.py
@@ -1097,8 +1097,8 @@ class KcOptTestCase(KcMasterTestCase):
#
# For example, to test your local keystoneclient,
#
- # KSCTEST_PATH=/opt/stack/python-keystoneclient \
- # tox -e py27 test_keystoneclient.KcOptTestCase
+ # KSCTEST_PATH=/opt/stack/python-keystoneclient;
+ # tox -e py27 test_keystoneclient.KcOptTestCase
def setUp(self):
self.checkout_info = os.environ.get('KSCTEST_PATH')
diff --git a/keystone/tests/test_keystoneclient_sql.py b/keystone/tests/test_keystoneclient_sql.py
index fdbd167cf..80348714b 100644
--- a/keystone/tests/test_keystoneclient_sql.py
+++ b/keystone/tests/test_keystoneclient_sql.py
@@ -370,8 +370,8 @@ class KcOptTestCase(KcMasterSqlTestCase):
#
# For example, to test your local keystoneclient,
#
- # KSCTEST_PATH=/opt/stack/python-keystoneclient \
- # tox -e py27 test_keystoneclient_sql.KcOptTestCase
+ # KSCTEST_PATH=/opt/stack/python-keystoneclient;
+ # tox -e py27 test_keystoneclient_sql.KcOptTestCase
def setUp(self):
self.checkout_info = os.environ.get('KSCTEST_PATH')
diff --git a/keystone/tests/test_ldap_livetest.py b/keystone/tests/test_ldap_livetest.py
index 8c9f1ed0b..a8db5a086 100644
--- a/keystone/tests/test_ldap_livetest.py
+++ b/keystone/tests/test_ldap_livetest.py
@@ -206,8 +206,8 @@ class LiveLDAPIdentity(test_backend_ldap.LDAPIdentity):
# The attribute used for the live LDAP tests is case insensitive.
def call_super():
- super(LiveLDAPIdentity, self).\
- test_create_project_case_sensitivity()
+ (super(LiveLDAPIdentity, self).
+ test_create_project_case_sensitivity())
self.assertRaises(exception.Conflict, call_super)
@@ -223,7 +223,7 @@ class LiveLDAPIdentity(test_backend_ldap.LDAPIdentity):
# The description attribute doesn't allow an empty value.
def call_super():
- super(LiveLDAPIdentity, self).\
- test_project_update_missing_attrs_with_a_falsey_value()
+ (super(LiveLDAPIdentity, self).
+ test_project_update_missing_attrs_with_a_falsey_value())
self.assertRaises(ldap.INVALID_SYNTAX, call_super)
diff --git a/keystone/tests/test_matchers.py b/keystone/tests/test_matchers.py
index e9413a1f6..ec97f130b 100644
--- a/keystone/tests/test_matchers.py
+++ b/keystone/tests/test_matchers.py
@@ -19,28 +19,24 @@ from keystone.tests import matchers
class TestXMLEquals(tests.BaseTestCase, helpers.TestMatchersInterface):
- matches_xml = b"""\
-
+ matches_xml = b"""
"""
- equivalent_xml = b"""\
-
+ equivalent_xml = b"""
"""
- mismatches_xml = b"""\
-
+ mismatches_xml = b"""
"""
- mismatches_description = """\
-expected =
+ mismatches_description = b"""expected =
diff --git a/tox.ini b/tox.ini
index 3043a2506..e2e6edada 100644
--- a/tox.ini
+++ b/tox.ini
@@ -100,8 +100,7 @@ show-source = true
# H405 multi line docstring summary not separated with an empty line
# H803 Commit message should not end with a period (do not remove per list discussion)
-# H904 Wrap long lines in parentheses instead of a backslash
-ignore = H405,H803,H904
+ignore = H405,H803
builtins = _
exclude=.venv,.git,.tox,build,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot