1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

refactor: use super() to reference parent class (#280)

This commit is contained in:
Jonas L 2023-08-02 12:05:00 +02:00 committed by GitHub
parent 1b83de57ef
commit 98afa99904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 126 additions and 126 deletions

View file

@ -150,7 +150,7 @@ from ..module_utils.vendor.hcloud import HCloudException
class AnsibleHcloudLoadBalancer(Hcloud):
def __init__(self, module):
Hcloud.__init__(self, module, "hcloud_load_balancer")
super().__init__(module, "hcloud_load_balancer")
self.hcloud_load_balancer = None
def _prepare_result(self):
@ -274,8 +274,8 @@ class AnsibleHcloudLoadBalancer(Hcloud):
except HCloudException as e:
self.fail_json_hcloud(e)
@staticmethod
def define_module():
@classmethod
def define_module(cls):
return AnsibleModule(
argument_spec=dict(
id={"type": "int"},
@ -290,7 +290,7 @@ class AnsibleHcloudLoadBalancer(Hcloud):
"choices": ["absent", "present"],
"default": "present",
},
**Hcloud.base_module_arguments()
**super().base_module_arguments()
),
required_one_of=[["id", "name"]],
mutually_exclusive=[["location", "network_zone"]],