mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-07-24 12:13:32 +00:00
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>
This commit is contained in:
parent
42d73f2894
commit
366d33158c
|
@ -30,10 +30,6 @@
|
|||
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 @@ def __init__(self, args: argparse.Namespace):
|
|||
self.qmp.connect()
|
||||
|
||||
@classmethod
|
||||
def register(cls, subparsers: Subparsers) -> None:
|
||||
def register(cls, subparsers: Any) -> None:
|
||||
"""
|
||||
Register this command with the argument parser.
|
||||
|
||||
|
|
Loading…
Reference in a new issue