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

@ -346,7 +346,7 @@ from ..module_utils.vendor.hcloud.volumes.domain import Volume
class AnsibleHcloudServer(Hcloud):
def __init__(self, module):
Hcloud.__init__(self, module, "hcloud_server")
super().__init__(module, "hcloud_server")
self.hcloud_server = None
def _prepare_result(self):
@ -863,8 +863,8 @@ class AnsibleHcloudServer(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"},
@ -896,7 +896,7 @@ class AnsibleHcloudServer(Hcloud):
"choices": ["absent", "present", "restarted", "started", "stopped", "rebuild"],
"default": "present",
},
**Hcloud.base_module_arguments()
**super().base_module_arguments()
),
required_one_of=[["id", "name"]],
mutually_exclusive=[["location", "datacenter"]],