Skip to content

Commit

Permalink
Super args, aren't.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Feb 16, 2023
1 parent 4e3d82f commit ce93e04
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sites/docs/concepts/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ you're done::

class MyProgram(Program):
def core_args(self):
core_args = super(MyProgram, self).core_args()
core_args = super().core_args()
extra_args = [
Argument(names=('foo', 'f'), help="Foo the bars"),
# ...
Expand Down
2 changes: 1 addition & 1 deletion tests/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def timed_out(self):
# Runner that fakes ^C during subprocess exec
class _KeyboardInterruptingRunner(_Dummy):
def __init__(self, *args, **kwargs):
super(_KeyboardInterruptingRunner, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self._interrupted = False

# Trigger KeyboardInterrupt during wait()
Expand Down
2 changes: 1 addition & 1 deletion tests/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def noboomplz(c):

class MyProgram(Program):
def create_config(self):
super(MyProgram, self).create_config()
super().create_config()
self.config.tasks.ignore_unknown_help = True

MyProgram(namespace=ns).run("inv --complete -- inv noboom", exit=False)
Expand Down
2 changes: 1 addition & 1 deletion tests/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def setup_method(self):
class MyThread(EHThread):
def __init__(self, *args, **kwargs):
self.queue = kwargs.pop("queue")
super(MyThread, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)

def _run(self):
self.queue.put(7)
Expand Down
2 changes: 1 addition & 1 deletion tests/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MockLoader(_BasicLoader):
def find(self, name):
# Sanity
assert name == "simple_ns_list"
return super(MockLoader, self).find(name)
return super().find(name)

config = Config({"tasks": {"collection_name": "simple_ns_list"}})
loader = MockLoader(config=config)
Expand Down
4 changes: 2 additions & 2 deletions tests/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def defaults_to_just_class_and_command(self):
def subclasses_may_add_more_kv_pairs(self):
class TotalFailure(Failure):
def _repr(self, **kwargs):
return super(TotalFailure, self)._repr(mood="dejected")
return super()._repr(mood="dejected")

expected = "<TotalFailure: cmd='onoz' mood=dejected>"
assert repr(TotalFailure(Result(command="onoz"))) == expected
Expand Down Expand Up @@ -1124,7 +1124,7 @@ def should_echo_stdin(self, input_, output):
# termios & such, which is harder to mock successfully.
if input_is_pty is not None:
input_.isatty = lambda: input_is_pty
return super(MyRunner, self).should_echo_stdin(
return super().should_echo_stdin(
input_, output
)

Expand Down
2 changes: 1 addition & 1 deletion tests/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def can_be_given_extra_kwargs_to_clone_with(self):
class MyCall(Call):
def __init__(self, *args, **kwargs):
self.hooray = kwargs.pop("hooray")
super(MyCall, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)

clone = orig.clone(into=MyCall, with_={"hooray": "woo"})
assert clone.hooray == "woo"

0 comments on commit ce93e04

Please sign in to comment.