Enable hacking rule H904

H904 Wrap long lines in parentheses instead of a backslash

Change-Id: Ifc1ff3acd07c63fecb0e3482ae6683bcf3e18cb2
This commit is contained in:
ZhiQiang Fan 2014-11-06 23:06:12 +08:00
parent b13db25481
commit fdd10a0320
7 changed files with 16 additions and 23 deletions

View File

@ -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__)

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -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)

View File

@ -19,28 +19,24 @@ from keystone.tests import matchers
class TestXMLEquals(tests.BaseTestCase, helpers.TestMatchersInterface):
matches_xml = b"""\
<?xml version="1.0" encoding="UTF-8"?>
matches_xml = b"""<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://docs.openstack.org/identity/api/v2.0">
<first z="0" y="1" x="2"/>
<second a="a" b="b"></second>
</test>
"""
equivalent_xml = b"""\
<?xml version="1.0" encoding="UTF-8"?>
equivalent_xml = b"""<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://docs.openstack.org/identity/api/v2.0">
<second a="a" b="b"/>
<first z="0" y="1" x="2"></first>
</test>
"""
mismatches_xml = b"""\
<?xml version="1.0" encoding="UTF-8"?>
mismatches_xml = b"""<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="http://docs.openstack.org/identity/api/v2.0">
<nope_it_fails/>
</test>
"""
mismatches_description = """\
expected =
mismatches_description = b"""expected =
<test xmlns="http://docs.openstack.org/identity/api/v2.0">
<first z="0" y="1" x="2"/>
<second a="a" b="b"/>

View File

@ -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