summaryrefslogtreecommitdiffstats
path: root/python/qemu/qmp
diff options
context:
space:
mode:
authorJohn Snow2022-01-10 20:13:49 +0100
committerJohn Snow2022-01-11 00:22:59 +0100
commit366d33158cea72e80d80505f94c34cb505385c0a (patch)
tree3c0b0186eb627a7918cde86d15fdf9f061025141 /python/qemu/qmp
parentPython/aqmp: fix type definitions for mypy 0.920 (diff)
downloadqemu-366d33158cea72e80d80505f94c34cb505385c0a.tar.gz
qemu-366d33158cea72e80d80505f94c34cb505385c0a.tar.xz
qemu-366d33158cea72e80d80505f94c34cb505385c0a.zip
python: update type hints for mypy 0.930
Mypy 0.930, released Dec 22, changes the way argparse objects are considered. Crafting a definition that works under Python 3.6 and an older mypy alongside newer versions simultaneously is ... difficult, so... eh. Stub it out with an 'Any' definition to get the CI moving again. Oh well. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Beraldo Leal <bleal@redhat.com> Message-id: 20220110191349.1841027-4-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/qemu/qmp')
-rw-r--r--python/qemu/qmp/qom_common.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/python/qemu/qmp/qom_common.py b/python/qemu/qmp/qom_common.py
index a59ae1a2a1..2e4c741f77 100644
--- a/python/qemu/qmp/qom_common.py
+++ b/python/qemu/qmp/qom_common.py
@@ -30,10 +30,6 @@ from typing import (
from . import QEMUMonitorProtocol, QMPError
-# The following is needed only for a type alias.
-Subparsers = argparse._SubParsersAction # pylint: disable=protected-access
-
-
class ObjectPropertyInfo:
"""
Represents the return type from e.g. qom-list.
@@ -89,7 +85,7 @@ class QOMCommand:
self.qmp.connect()
@classmethod
- def register(cls, subparsers: Subparsers) -> None:
+ def register(cls, subparsers: Any) -> None:
"""
Register this command with the argument parser.