From c0563528e37222a81eb4906c9f498b47ef9c6f5c Mon Sep 17 00:00:00 2001 From: zhufl Date: Wed, 21 Sep 2016 11:58:30 +0800 Subject: [PATCH] Remove unnecessary __init__ This is to remove __init__ that doing nothing special than super to keep code clean. Change-Id: Ib3cada8bcb4029452f8fd71a9e278f59cd1e79d5 --- heat/engine/resources/aws/cfn/wait_condition.py | 3 --- heat/engine/resources/openstack/heat/wait_condition.py | 3 --- .../engine/resources/openstack/keystone/role_assignments.py | 6 ------ heat/engine/resources/stack_user.py | 3 --- 4 files changed, 15 deletions(-) diff --git a/heat/engine/resources/aws/cfn/wait_condition.py b/heat/engine/resources/aws/cfn/wait_condition.py index 14b6ea20fb..669ffd75f4 100644 --- a/heat/engine/resources/aws/cfn/wait_condition.py +++ b/heat/engine/resources/aws/cfn/wait_condition.py @@ -74,9 +74,6 @@ class WaitCondition(heat_wc.HeatWaitCondition): ), } - def __init__(self, name, json_snippet, stack): - super(WaitCondition, self).__init__(name, json_snippet, stack) - def _validate_handle_url(self): handle_url = self.properties[self.HANDLE] handle_id = identifier.ResourceIdentifier.from_arn_url(handle_url) diff --git a/heat/engine/resources/openstack/heat/wait_condition.py b/heat/engine/resources/openstack/heat/wait_condition.py index 3fb1dc1d3e..eb286828c0 100644 --- a/heat/engine/resources/openstack/heat/wait_condition.py +++ b/heat/engine/resources/openstack/heat/wait_condition.py @@ -89,9 +89,6 @@ class HeatWaitCondition(resource.Resource): ), } - def __init__(self, name, definition, stack): - super(HeatWaitCondition, self).__init__(name, definition, stack) - def _get_handle_resource(self): return self.stack.resource_by_refid(self.properties[self.HANDLE]) diff --git a/heat/engine/resources/openstack/keystone/role_assignments.py b/heat/engine/resources/openstack/keystone/role_assignments.py index e71722c462..49749f3368 100644 --- a/heat/engine/resources/openstack/keystone/role_assignments.py +++ b/heat/engine/resources/openstack/keystone/role_assignments.py @@ -341,9 +341,6 @@ class KeystoneUserRoleAssignment(resource.Resource, properties_schema.update( KeystoneRoleAssignmentMixin.mixin_properties_schema) - def __init__(self, *args, **kwargs): - super(KeystoneUserRoleAssignment, self).__init__(*args, **kwargs) - def client(self): return super(KeystoneUserRoleAssignment, self).client().client @@ -402,9 +399,6 @@ class KeystoneGroupRoleAssignment(resource.Resource, properties_schema.update( KeystoneRoleAssignmentMixin.mixin_properties_schema) - def __init__(self, *args, **kwargs): - super(KeystoneGroupRoleAssignment, self).__init__(*args, **kwargs) - def client(self): return super(KeystoneGroupRoleAssignment, self).client().client diff --git a/heat/engine/resources/stack_user.py b/heat/engine/resources/stack_user.py index 09f7f4b368..853b1db13d 100644 --- a/heat/engine/resources/stack_user.py +++ b/heat/engine/resources/stack_user.py @@ -27,9 +27,6 @@ class StackUser(resource.Resource): # Subclasses create a user, and optionally keypair associated with a # resource in a stack. Users are created in the heat stack user domain # (in a project specific to the stack) - def __init__(self, name, json_snippet, stack): - super(StackUser, self).__init__(name, json_snippet, stack) - def handle_create(self): self._create_user()