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
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