[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 35/72] scripts/qmp-shell: Use python3-style super()
From: |
John Snow |
Subject: |
[PATCH v2 35/72] scripts/qmp-shell: Use python3-style super() |
Date: |
Tue, 3 Nov 2020 19:35:25 -0500 |
Signed-off-by: John Snow <jsnow@redhat.com>
---
scripts/qmp/qmp-shell | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
index 69359ec8ad7f..2e9ae5d59bd9 100755
--- a/scripts/qmp/qmp-shell
+++ b/scripts/qmp/qmp-shell
@@ -116,7 +116,7 @@ class FuzzyJSON(ast.NodeTransformer):
# _execute_cmd()). Let's design a better one.
class QMPShell(qmp.QEMUMonitorProtocol):
def __init__(self, address, pretty=False):
- super(QMPShell, self).__init__(self.__get_address(address))
+ super().__init__(self.__get_address(address))
self._greeting = None
self._completer = None
self._pretty = pretty
@@ -301,7 +301,7 @@ class QMPShell(qmp.QEMUMonitorProtocol):
return True
def connect(self, negotiate: bool = True):
- self._greeting = super(QMPShell, self).connect(negotiate)
+ self._greeting = super().connect(negotiate)
self.__completer_setup()
def show_banner(self, msg='Welcome to the QMP low-level shell!'):
@@ -342,7 +342,7 @@ class QMPShell(qmp.QEMUMonitorProtocol):
class HMPShell(QMPShell):
def __init__(self, address):
- QMPShell.__init__(self, address)
+ super().__init__(address)
self.__cpu_index = 0
def __cmd_completion(self):
--
2.26.2
- [PATCH v2 28/72] scripts/qmp-shell: apply isort rules, (continued)
- [PATCH v2 28/72] scripts/qmp-shell: apply isort rules, John Snow, 2020/11/03
- [PATCH v2 21/72] scripts/qemu-ga-client: add module docstring, John Snow, 2020/11/03
- [PATCH v2 27/72] scripts/qemu-ga-client: Add forwarder stub, John Snow, 2020/11/03
- [PATCH v2 25/72] scripts/qemu-ga-client: move to python/qemu/qmp/qemu_ga_client.py, John Snow, 2020/11/03
- [PATCH v2 17/72] scripts/qemu-ga-client: apply isort rules, John Snow, 2020/11/03
- [PATCH v2 14/72] scripts/qom-fuse: add redirection shim to python/qemu/qmp/qom-fuse.py, John Snow, 2020/11/03
- [PATCH v2 22/72] scripts/qemu-ga-client: apply (most) pylint rules, John Snow, 2020/11/03
- [PATCH v2 31/72] scripts/qmp-shell: fix exception handling, John Snow, 2020/11/03
- [PATCH v2 32/72] scripts/qmp-shell: fix connect method signature, John Snow, 2020/11/03
- [PATCH v2 30/72] scripts/qmp-shell: fix show_banner signature, John Snow, 2020/11/03
- [PATCH v2 35/72] scripts/qmp-shell: Use python3-style super(),
John Snow <=
- [PATCH v2 34/72] scripts/qmp-shell: use @classmethod where appropriate, John Snow, 2020/11/03
- [PATCH v2 40/72] scripts/qmp-shell: rename one and two-letter variables, John Snow, 2020/11/03
- [PATCH v2 24/72] scripts/qmp/qemu-ga-client: add mypy type hints, John Snow, 2020/11/03
- [PATCH v2 33/72] scripts/qmp-shell: remove shadowed variable from _print(), John Snow, 2020/11/03
- [PATCH v2 36/72] scripts/qmp-shell: declare verbose in __init__, John Snow, 2020/11/03
- [PATCH v2 39/72] scripts/qmp-shell: make QMPCompleter returns explicit, John Snow, 2020/11/03
- [PATCH v2 42/72] scripts/qmp-shell: explicitly chain exception context, John Snow, 2020/11/03
- [PATCH v2 37/72] scripts/qmp-shell: use triple-double-quote docstring style, John Snow, 2020/11/03
- [PATCH v2 43/72] scripts/qmp-shell: remove if-raise-else patterns, John Snow, 2020/11/03
- [PATCH v2 41/72] scripts/qmp-shell: fix shell history exception handling, John Snow, 2020/11/03