1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-22 19:59:07 +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:
Felix Fontein 2025-10-30 20:17:26 +01:00 committed by GitHub
parent 0c5466de47
commit 74c2c804e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
204 changed files with 390 additions and 401 deletions

View file

@ -116,7 +116,7 @@ class BecomeModule(BecomeBase):
return bool(re.match(b_prompt, b_output))
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd

View file

@ -81,7 +81,7 @@ class BecomeModule(BecomeBase):
fail = ('Sorry, try again.',)
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd

View file

@ -109,7 +109,7 @@ class BecomeModule(BecomeBase):
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
# Prompt handling for ``ksu`` is more complicated, this
# is used to satisfy the connection plugin

View file

@ -117,7 +117,7 @@ class BecomeModule(BecomeBase):
return ansi_color_codes.sub(b"", line)
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd

View file

@ -92,7 +92,7 @@ class BecomeModule(BecomeBase):
prompt = 'Password:'
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd

View file

@ -95,7 +95,7 @@ class BecomeModule(BecomeBase):
name = 'community.general.pfexec'
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd

View file

@ -68,7 +68,7 @@ class BecomeModule(BecomeBase):
prompt = 'Enter UPM user password:'
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd

View file

@ -82,7 +82,7 @@ class BecomeModule(BecomeBase):
fail = missing = ('Sorry, try again with sesu.',)
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd

View file

@ -87,7 +87,7 @@ class BecomeModule(BecomeBase):
missing = ('Sorry, a password is required to run sudo', 'sudo: a password is required')
def build_become_command(self, cmd, shell):
super(BecomeModule, self).build_become_command(cmd, shell)
super().build_become_command(cmd, shell)
if not cmd:
return cmd