From 5b17402cb5b44f8fcbeeede16cce5a2f211905e2 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Mon, 20 May 2013 16:11:17 +1000 Subject: [PATCH] Fix PEP H101 (Use TODO(NAME)) Change-Id: I77c9caa650462725b7c686fbafd9753d046b138d --- heat/api/cfn/v1/stacks.py | 4 ++-- heat/cfn_client/boto_client_cloudwatch.py | 2 +- heat/engine/resources/internet_gateway.py | 2 +- heat/engine/resources/route_table.py | 4 ++-- heat/engine/resources/subnet.py | 6 +++--- heat/engine/resources/user.py | 2 +- heat/tests/test_api_cfn_v1.py | 2 +- heat/tests/test_eip.py | 2 +- tox.ini | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/heat/api/cfn/v1/stacks.py b/heat/api/cfn/v1/stacks.py index 959a756df1..7ca8ef6708 100644 --- a/heat/api/cfn/v1/stacks.py +++ b/heat/api/cfn/v1/stacks.py @@ -133,7 +133,7 @@ class StackController(object): result = api_utils.reformat_dict_keys(keymap, s) # AWS docs indicate DeletionTime is ommitted for current stacks - # This is still TODO in the engine, we don't keep data for + # This is still TODO(unknown) in the engine, we don't keep data for # stacks after they are deleted if engine_api.STACK_DELETION_TIME in s: result['DeletionTime'] = s[engine_api.STACK_DELETION_TIME] @@ -279,7 +279,7 @@ class StackController(object): the engine API. FIXME: we currently only support a subset of the AWS defined parameters (both here and in the engine) """ - # TODO : Capabilities, NotificationARNs + # TODO(shardy) : Capabilities, NotificationARNs keymap = {'TimeoutInMinutes': engine_api.PARAM_TIMEOUT, 'DisableRollback': engine_api.PARAM_DISABLE_ROLLBACK} diff --git a/heat/cfn_client/boto_client_cloudwatch.py b/heat/cfn_client/boto_client_cloudwatch.py index 98a14c4682..ed72b2db69 100644 --- a/heat/cfn_client/boto_client_cloudwatch.py +++ b/heat/cfn_client/boto_client_cloudwatch.py @@ -29,7 +29,7 @@ class BotoCWClient(CloudWatchConnection): ''' Wrapper class for boto CloudWatchConnection class ''' - # TODO : These should probably go in the CW API and be imported + # TODO(unknown) : These should probably go in the CW API and be imported DEFAULT_NAMESPACE = "heat/unknown" METRIC_UNITS = ("Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", diff --git a/heat/engine/resources/internet_gateway.py b/heat/engine/resources/internet_gateway.py index 07460ff79f..f19bbcc4a1 100644 --- a/heat/engine/resources/internet_gateway.py +++ b/heat/engine/resources/internet_gateway.py @@ -43,7 +43,7 @@ class InternetGateway(resource.Resource): ext_filter = {'router:external': True} ext_nets = client.list_networks(**ext_filter)['networks'] if len(ext_nets) != 1: - # TODO sbaker if there is more than one external network + # TODO(sbaker) if there is more than one external network # add a heat configuration variable to set the ID of # the default one raise exception.Error( diff --git a/heat/engine/resources/route_table.py b/heat/engine/resources/route_table.py index 1adde63e2f..d1d81d0792 100644 --- a/heat/engine/resources/route_table.py +++ b/heat/engine/resources/route_table.py @@ -53,7 +53,7 @@ class RouteTable(resource.Resource): vpc_md['all_router_ids'].append(router['id']) vpc.metadata = vpc_md - # TODO sbaker all_router_ids has changed, any VPCGatewayAttachment + # TODO(sbaker) all_router_ids has changed, any VPCGatewayAttachment # for this vpc needs to be notified self.resource_id_set(router['id']) @@ -72,7 +72,7 @@ class RouteTable(resource.Resource): vpc_md = vpc.metadata vpc_md['all_router_ids'].remove(router_id) vpc.metadata = vpc_md - # TODO sbaker all_router_ids has changed, any VPCGatewayAttachment + # TODO(sbaker) all_router_ids has changed, any VPCGatewayAttachment # for this vpc needs to be notified def handle_update(self, json_snippet): diff --git a/heat/engine/resources/subnet.py b/heat/engine/resources/subnet.py index a4e8a7c61e..bbdbbc9a65 100644 --- a/heat/engine/resources/subnet.py +++ b/heat/engine/resources/subnet.py @@ -46,7 +46,7 @@ class Subnet(resource.Resource): def handle_create(self): client = self.quantum() - # TODO sbaker Verify that this CidrBlock is within the vpc CidrBlock + # TODO(sbaker) Verify that this CidrBlock is within the vpc CidrBlock network_id = self.properties.get('VpcId') vpc = self.stack.resource_by_refid(network_id) router_id = vpc.metadata['router_id'] @@ -59,7 +59,7 @@ class Subnet(resource.Resource): } subnet = client.create_subnet({'subnet': props})['subnet'] - #TODO sbaker check for a non-default router for this network + #TODO(sbaker) check for a non-default router for this network # and use that instead if it exists client.add_interface_router( router_id, @@ -78,7 +78,7 @@ class Subnet(resource.Resource): router_id = self.metadata['router_id'] subnet_id = self.resource_id - #TODO sbaker check for a non-default router for this network + #TODO(sbaker) check for a non-default router for this network # and remove that instead if it exists try: client.remove_interface_router( diff --git a/heat/engine/resources/user.py b/heat/engine/resources/user.py index 48b5832602..de01b485b9 100644 --- a/heat/engine/resources/user.py +++ b/heat/engine/resources/user.py @@ -97,7 +97,7 @@ class User(resource.Resource): return unicode(self.physical_resource_name()) def FnGetAtt(self, key): - #TODO Implement Arn attribute + #TODO(asalkeld) Implement Arn attribute raise exception.InvalidTemplateAttribute( resource=self.physical_resource_name(), key=key) diff --git a/heat/tests/test_api_cfn_v1.py b/heat/tests/test_api_cfn_v1.py index 8ef8eabe78..0a99d80dc8 100644 --- a/heat/tests/test_api_cfn_v1.py +++ b/heat/tests/test_api_cfn_v1.py @@ -434,7 +434,7 @@ class CfnStackControllerTest(HeatTestCase): expected = "abcdef" self.assertEqual(result, expected) - # TODO : test the _get_template TemplateUrl case + # TODO(shardy) : test the _get_template TemplateUrl case def test_create(self): # Format a dummy request diff --git a/heat/tests/test_eip.py b/heat/tests/test_eip.py index 169f04e155..d01373d9c3 100644 --- a/heat/tests/test_eip.py +++ b/heat/tests/test_eip.py @@ -119,7 +119,7 @@ class EIPTest(HeatTestCase): resource = self.create_eip(t, stack, 'IPAddress') association = self.create_association(t, stack, 'IPAssoc') - # TODO sbaker, figure out why this is an empty string + # TODO(sbaker), figure out why this is an empty string #self.assertEqual('', association.FnGetRefId()) association.delete() diff --git a/tox.ini b/tox.ini index 4240ad26e9..99e473e3f3 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ commands = python setup.py testr --coverage [flake8] -ignore = H302,H303,H304,H403,H404,F403,F841,H306,H201,H101,H703,H702 +ignore = H302,H303,H304,H403,H404,F403,F841,H306,H201,H702,H703 show-source = true builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build