summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2013-05-23 11:34:35 -0500
committerDolph Mathews <dolph.mathews@gmail.com>2013-05-23 17:02:46 -0500
commit71c6a4b88279ddf9047595fb4c1ffbce4062621d (patch)
treea5f64884ddfd559d6b968732122956a1c041801a
parentb1f663617aea75075fc9e3f76a1ffa2a1eb3cd42 (diff)
downloadkeystone-71c6a4b88279ddf9047595fb4c1ffbce4062621d.tar.gz
keystone-71c6a4b88279ddf9047595fb4c1ffbce4062621d.tar.xz
keystone-71c6a4b88279ddf9047595fb4c1ffbce4062621d.zip
Use TODO(NAME) (flake8 H101)
Change-Id: Ic47bdd61d9818f203a88ae16f97c2b61b1c1bd8c
-rw-r--r--keystone/auth/controllers.py2
-rw-r--r--keystone/auth/plugins/password.py2
-rw-r--r--keystone/auth/token_factory.py4
-rw-r--r--keystone/identity/backends/ldap/core.py2
-rw-r--r--keystone/identity/controllers.py2
-rw-r--r--keystone/token/controllers.py12
-rw-r--r--keystone/trust/controllers.py4
-rw-r--r--tests/test_auth.py2
-rw-r--r--tests/test_backend_ldap.py2
-rw-r--r--tests/test_keystoneclient.py6
-rw-r--r--tests/test_sql_upgrade.py17
-rw-r--r--tests/test_v3_protection.py2
-rw-r--r--tox.ini3
13 files changed, 29 insertions, 31 deletions
diff --git a/keystone/auth/controllers.py b/keystone/auth/controllers.py
index 0cb070bc..f643cf27 100644
--- a/keystone/auth/controllers.py
+++ b/keystone/auth/controllers.py
@@ -187,7 +187,7 @@ class AuthInfo(object):
raise exception.Forbidden('Trusts are disabled.')
trust_ref = self._lookup_trust(
self.auth['scope']['OS-TRUST:trust'])
- #TODO ayoung when trusts support domain, Fill in domain data here
+ # TODO(ayoung): when trusts support domains, fill in domain data
if 'project_id' in trust_ref:
project_ref = self._lookup_project(
{'id': trust_ref['project_id']})
diff --git a/keystone/auth/plugins/password.py b/keystone/auth/plugins/password.py
index d5043611..662cca07 100644
--- a/keystone/auth/plugins/password.py
+++ b/keystone/auth/plugins/password.py
@@ -107,7 +107,7 @@ class Password(auth.AuthMethodHandler):
""" Try to authenticate against the identity backend. """
user_info = UserAuthInfo(context, auth_payload)
- # FIXME: identity.authenticate() can use some refactoring since
+ # FIXME(gyee): identity.authenticate() can use some refactoring since
# all we care is password matches
self.identity_api.authenticate(
context=context,
diff --git a/keystone/auth/token_factory.py b/keystone/auth/token_factory.py
index a67c973a..37c9f1ed 100644
--- a/keystone/auth/token_factory.py
+++ b/keystone/auth/token_factory.py
@@ -178,11 +178,11 @@ class TokenDataHelper(object):
try:
service_catalog = self.catalog_api.get_v3_catalog(
self.context, user_id, project_id)
- #TODO KVS backend needs a sample implementation
+ # TODO(ayoung): KVS backend needs a sample implementation
except exception.NotImplemented:
service_catalog = {}
# TODO(gyee): v3 service catalog is not quite completed yet
- #TODO Enforce Endpoints for trust
+ # TODO(ayoung): Enforce Endpoints for trust
token_data['catalog'] = service_catalog
def _populate_token(self, token_data, expires=None, trust=None):
diff --git a/keystone/identity/backends/ldap/core.py b/keystone/identity/backends/ldap/core.py
index 1fad1120..907ae235 100644
--- a/keystone/identity/backends/ldap/core.py
+++ b/keystone/identity/backends/ldap/core.py
@@ -840,7 +840,7 @@ class RoleApi(common_ldap.BaseLdap, ApiShimMixin):
pass
super(RoleApi, self).delete(id)
-# TODO (spzala) - this is only placeholder for group and domain role support
+# TODO(spzala): this is only placeholder for group and domain role support
# which will be added under bug 1101287
def roles_delete_subtree_by_type(self, id, type):
conn = self.get_connection()
diff --git a/keystone/identity/controllers.py b/keystone/identity/controllers.py
index 125edddc..3e60272d 100644
--- a/keystone/identity/controllers.py
+++ b/keystone/identity/controllers.py
@@ -472,7 +472,7 @@ class DomainV3(controller.V3Controller):
"""
# Start by disabling all the users in this domain, to minimize the
# the risk that things are changing under our feet.
- # TODO(henry-nash) In theory this step should not be necessary, since
+ # TODO(henry-nash): In theory this step should not be necessary, since
# users of a disabled domain are prevented from authenticating.
# However there are some existing bugs in this area (e.g. 1130236).
# Consider removing this code once these have been fixed.
diff --git a/keystone/token/controllers.py b/keystone/token/controllers.py
index bc62d883..1e2eb7d6 100644
--- a/keystone/token/controllers.py
+++ b/keystone/token/controllers.py
@@ -215,8 +215,8 @@ class Auth(controller.V2Controller):
tenant_ref = self._get_project_ref(context, user_id, tenant_id)
metadata_ref = self._get_metadata_ref(context, user_id, tenant_id)
- # TODO (henry-nash) If no tenant was specified, instead check
- # for a domain and find any related user/group roles
+ # TODO(henry-nash): If no tenant was specified, instead check for a
+ # domain and find any related user/group roles
self._append_roles(metadata_ref,
self._get_group_metadata_ref(
@@ -303,8 +303,8 @@ class Auth(controller.V2Controller):
# specified, we will have obtained its metadata. In this case
# we just need to add in any group roles.
#
- # TODO (henry-nash) If no tenant was specified, instead check
- # for a domain and find any related user/group roles
+ # TODO(henry-nash): If no tenant was specified, instead check for a
+ # domain and find any related user/group roles
self._append_roles(metadata_ref,
self._get_group_metadata_ref(
@@ -335,8 +335,8 @@ class Auth(controller.V2Controller):
tenant_ref = self._get_project_ref(context, user_id, tenant_id)
metadata_ref = self._get_metadata_ref(context, user_id, tenant_id)
- # TODO (henry-nash) If no tenant was specified, instead check
- # for a domain and find any related user/group roles
+ # TODO(henry-nash): If no tenant was specified, instead check for a
+ # domain and find any related user/group roles
self._append_roles(metadata_ref,
self._get_group_metadata_ref(
diff --git a/keystone/trust/controllers.py b/keystone/trust/controllers.py
index aecdbd8a..01ebc176 100644
--- a/keystone/trust/controllers.py
+++ b/keystone/trust/controllers.py
@@ -110,8 +110,8 @@ class TrustV3(controller.V3Controller):
The user creating the trust must be trustor
"""
- #TODO instead of raising ValidationError on the first problem,
- #return a collection of all the problems.
+ # TODO(ayoung): instead of raising ValidationError on the first
+ # problem, return a collection of all the problems.
if not trust:
raise exception.ValidationError(attribute='trust',
target='request')
diff --git a/tests/test_auth.py b/tests/test_auth.py
index 7a6ca854..e572727b 100644
--- a/tests/test_auth.py
+++ b/tests/test_auth.py
@@ -596,7 +596,7 @@ class AuthWithTrust(AuthTest):
self.assertEquals(token_user['id'],
self.new_trust['trustee_user_id'])
- #TODO Endpoints
+ # TODO(ayoung): Endpoints
def test_token_from_trust_wrong_user_fails(self):
request_body = self.build_v2_token_request('FOO', 'foo2')
diff --git a/tests/test_backend_ldap.py b/tests/test_backend_ldap.py
index 68b1f5df..0f53b06c 100644
--- a/tests/test_backend_ldap.py
+++ b/tests/test_backend_ldap.py
@@ -386,7 +386,7 @@ class LDAPIdentity(test.TestCase, test_backend.IdentityTests):
expected_dict = {'description': 'name', 'gecos': 'password'}
self.assertDictEqual(expected_dict, mapping)
-# TODO (henry-nash) These need to be removed when the full LDAP implementation
+# TODO(henry-nash): These need to be removed when the full LDAP implementation
# is submitted - see Bugs 1092187, 1101287, 1101276, 1101289
# (spzala)The group and domain crud tests below override the standard ones
diff --git a/tests/test_keystoneclient.py b/tests/test_keystoneclient.py
index ec6a6bf6..0d6ae9a4 100644
--- a/tests/test_keystoneclient.py
+++ b/tests/test_keystoneclient.py
@@ -953,7 +953,7 @@ class KcMasterTestCase(CompatTestCase, KeystoneClientTests):
token_id = client.auth_token
new_password = uuid.uuid4().hex
- # TODO(derekh) : Update to use keystoneclient when available
+ # TODO(derekh): Update to use keystoneclient when available
class FakeResponse(object):
def start_fake_response(self, status, headers):
self.response_status = int(status.split(' ', 1)[0])
@@ -980,7 +980,7 @@ class KcMasterTestCase(CompatTestCase, KeystoneClientTests):
token_id = client.auth_token
new_password = uuid.uuid4().hex
- # TODO(derekh) : Update to use keystoneclient when available
+ # TODO(derekh): Update to use keystoneclient when available
class FakeResponse(object):
def start_fake_response(self, status, headers):
self.response_status = int(status.split(' ', 1)[0])
@@ -1009,7 +1009,7 @@ class KcMasterTestCase(CompatTestCase, KeystoneClientTests):
token_id = client.auth_token
new_password = uuid.uuid4().hex
- # TODO(derekh) : Update to use keystoneclient when available
+ # TODO(derekh): Update to use keystoneclient when available
class FakeResponse(object):
def start_fake_response(self, status, headers):
self.response_status = int(status.split(' ', 1)[0])
diff --git a/tests/test_sql_upgrade.py b/tests/test_sql_upgrade.py
index 36d452af..51ac2b7d 100644
--- a/tests/test_sql_upgrade.py
+++ b/tests/test_sql_upgrade.py
@@ -703,12 +703,11 @@ class SqlUpgradeTests(test.TestCase):
user['domain_id'] = domain2['id']
cmd = this_table.insert().values(user)
self.engine.execute(cmd)
- # TODO(henry-nash). For now, as part of clean-up we
- # delete one of these users. Although not part of this test,
- # unless we do so the downgrade(16->15) that is part of
- # teardown with fail due to having two uses with clashing
- # name as we try to revert to a single global name space. This
- # limitation is raised as Bug #1125046 and the delete
+ # TODO(henry-nash): For now, as part of clean-up we delete one of these
+ # users. Although not part of this test, unless we do so the
+ # downgrade(16->15) that is part of teardown with fail due to having
+ # two uses with clashing name as we try to revert to a single global
+ # name space. This limitation is raised as Bug #1125046 and the delete
# could be removed depending on how that bug is resolved.
cmd = this_table.delete(id=user['id'])
self.engine.execute(cmd)
@@ -731,9 +730,9 @@ class SqlUpgradeTests(test.TestCase):
project['domain_id'] = domain2['id']
cmd = this_table.insert().values(project)
self.engine.execute(cmd)
- # TODO(henry-nash) For now, we delete one of the projects for
- # the same reason as we delete one of the users (Bug #1125046).
- # This delete could be removed depending on that bug resolution.
+ # TODO(henry-nash): For now, we delete one of the projects for the same
+ # reason as we delete one of the users (Bug #1125046). This delete
+ # could be removed depending on that bug resolution.
cmd = this_table.delete(id=project['id'])
self.engine.execute(cmd)
diff --git a/tests/test_v3_protection.py b/tests/test_v3_protection.py
index 2cd5a30c..d437c014 100644
--- a/tests/test_v3_protection.py
+++ b/tests/test_v3_protection.py
@@ -159,7 +159,7 @@ class IdentityTestProtectedCase(test_v3.RestfulTestCase):
payload
"""
- # TODO (henry-nash, ayoung): It would be good to expand this
+ # TODO(henry-nash, ayoung): It would be good to expand this
# test for further test flattening, e.g. protect on, say, an
# attribute of an object being created
new_policy = {"identity:get_user": [["user_id:%(user_id)s"]]}
diff --git a/tox.ini b/tox.ini
index 0ea4194d..6fb00d64 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,7 +31,6 @@ commands = {posargs}
[flake8]
show-source = true
-# H101: use TODO(NAME)
# H201: no 'except:' at least use 'except Exception:'
# H301: one import per line
# H302: import only modules
@@ -45,7 +44,7 @@ show-source = true
# H702: use bare string concatenation instead of +; formatting operation should be outside of localization method call
# H703: multiple positional placeholders
# H902: use the 'not in' operator for collection membership evaluation
-ignore = H101,H201,H301,H302,H304,H306,H401,H402,H403,H404,H701,H702,H703,H902
+ignore = H201,H301,H302,H304,H306,H401,H402,H403,H404,H701,H702,H703,H902
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor