mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-05 17:55:11 +00:00
Cleanup: use super() instead of super(__class__, self) (#11016)
* Address UP008: Use super() instead of super(__class__, self). * Linting.
This commit is contained in:
parent
0c5466de47
commit
74c2c804e5
204 changed files with 390 additions and 401 deletions
|
|
@ -90,7 +90,7 @@ class Connection(ConnectionBase):
|
|||
has_pipelining = True
|
||||
|
||||
def __init__(self, play_context, new_stdin, *args, **kwargs):
|
||||
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
|
||||
super().__init__(play_context, new_stdin, *args, **kwargs)
|
||||
|
||||
self._incus_cmd = get_bin_path("incus")
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ class Connection(ConnectionBase):
|
|||
|
||||
def _connect(self):
|
||||
"""connect to Incus (nothing to do here) """
|
||||
super(Connection, self)._connect()
|
||||
super()._connect()
|
||||
|
||||
if not self._connected:
|
||||
self._display.vvv(f"ESTABLISH Incus CONNECTION FOR USER: {self.get_option('remote_user')}",
|
||||
|
|
@ -137,7 +137,7 @@ class Connection(ConnectionBase):
|
|||
|
||||
def exec_command(self, cmd, in_data=None, sudoable=True):
|
||||
""" execute a command on the Incus host """
|
||||
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
||||
super().exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
||||
|
||||
self._display.vvv(f"EXEC {cmd}",
|
||||
host=self._instance())
|
||||
|
|
@ -207,7 +207,7 @@ class Connection(ConnectionBase):
|
|||
|
||||
def put_file(self, in_path, out_path):
|
||||
""" put a file from local to Incus """
|
||||
super(Connection, self).put_file(in_path, out_path)
|
||||
super().put_file(in_path, out_path)
|
||||
|
||||
self._display.vvv(f"PUT {in_path} TO {out_path}",
|
||||
host=self._instance())
|
||||
|
|
@ -251,7 +251,7 @@ class Connection(ConnectionBase):
|
|||
|
||||
def fetch_file(self, in_path, out_path):
|
||||
""" fetch a file from Incus to local """
|
||||
super(Connection, self).fetch_file(in_path, out_path)
|
||||
super().fetch_file(in_path, out_path)
|
||||
|
||||
self._display.vvv(f"FETCH {in_path} TO {out_path}",
|
||||
host=self._instance())
|
||||
|
|
@ -269,6 +269,6 @@ class Connection(ConnectionBase):
|
|||
|
||||
def close(self):
|
||||
""" close the connection (nothing to do here) """
|
||||
super(Connection, self).close()
|
||||
super().close()
|
||||
|
||||
self._connected = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue