From ce93e04d014350b8305eeae306e9866a8bd33b8d Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 16 Feb 2023 14:59:10 -0500 Subject: [PATCH] Super args, aren't. --- sites/docs/concepts/library.rst | 2 +- tests/_util.py | 2 +- tests/completion.py | 2 +- tests/concurrency.py | 2 +- tests/loader.py | 2 +- tests/runners.py | 4 ++-- tests/task.py | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sites/docs/concepts/library.rst b/sites/docs/concepts/library.rst index 532b3828..1eeb5537 100644 --- a/sites/docs/concepts/library.rst +++ b/sites/docs/concepts/library.rst @@ -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"), # ... diff --git a/tests/_util.py b/tests/_util.py index 3687666c..50a4c7fc 100644 --- a/tests/_util.py +++ b/tests/_util.py @@ -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() diff --git a/tests/completion.py b/tests/completion.py index 10369d0c..9979ee4c 100644 --- a/tests/completion.py +++ b/tests/completion.py @@ -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) diff --git a/tests/concurrency.py b/tests/concurrency.py index 7110e681..59feb95b 100644 --- a/tests/concurrency.py +++ b/tests/concurrency.py @@ -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) diff --git a/tests/loader.py b/tests/loader.py index 7642c703..9d6065c7 100644 --- a/tests/loader.py +++ b/tests/loader.py @@ -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) diff --git a/tests/runners.py b/tests/runners.py index 2086f57a..57880d10 100644 --- a/tests/runners.py +++ b/tests/runners.py @@ -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 = "" assert repr(TotalFailure(Result(command="onoz"))) == expected @@ -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 ) diff --git a/tests/task.py b/tests/task.py index b763b162..d60d9123 100644 --- a/tests/task.py +++ b/tests/task.py @@ -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"