[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 46/72] python/qmp: Fix type of SocketAddrT
|
From: |
John Snow |
|
Subject: |
[PATCH v2 46/72] python/qmp: Fix type of SocketAddrT |
|
Date: |
Tue, 3 Nov 2020 19:35:36 -0500 |
This is an integer, not a string. We didn't catch this before because we
have not been type checking any of the clients that use this, and it was
self-consistent enough.
Mypy was not introspecting into the socket() interface to realize we
were passing a bad type. Fixed now.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/qmp/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/qemu/qmp/__init__.py b/python/qemu/qmp/__init__.py
index 7355a558796f..dd211e3f6511 100644
--- a/python/qemu/qmp/__init__.py
+++ b/python/qemu/qmp/__init__.py
@@ -49,7 +49,7 @@
# {} is the QMPReturnValue.
-InternetAddrT = Tuple[str, str]
+InternetAddrT = Tuple[str, int]
UnixAddrT = str
SocketAddrT = Union[InternetAddrT, UnixAddrT]
--
2.26.2
- [PATCH v2 24/72] scripts/qmp/qemu-ga-client: add mypy type hints, (continued)
- [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
- [PATCH v2 44/72] scripts/qmp-shell: use isinstance() instead of type(), John Snow, 2020/11/03
- [PATCH v2 45/72] scripts/qmp-shell: use argparse, John Snow, 2020/11/03
- [PATCH v2 46/72] python/qmp: Fix type of SocketAddrT,
John Snow <=
- [PATCH v2 38/72] scripts/qmp-shell: ignore visit_Name name, John Snow, 2020/11/03
- [PATCH v2 47/72] python/qmp: add parse_address classmethod, John Snow, 2020/11/03
- [PATCH v2 48/72] scripts/qmp-shell: Add pretty attribute to HMP shell, John Snow, 2020/11/03
- [PATCH v2 49/72] scripts/qmp-shell: Make verbose a public attribute, John Snow, 2020/11/03
- [PATCH v2 50/72] scripts/qmp-shell: move get_prompt() to prompt property, John Snow, 2020/11/03
- [PATCH v2 51/72] scripts/qmp-shell: remove prompt argument from read_exec_command, John Snow, 2020/11/03
- [PATCH v2 52/72] scripts/qmp-shell: move the REPL functionality into QMPShell, John Snow, 2020/11/03
- [PATCH v2 53/72] scripts/qmp-shell: Fix "FuzzyJSON" parser, John Snow, 2020/11/03
- [PATCH v2 54/72] scripts/qmp-shell: refactor QMPCompleter, John Snow, 2020/11/03
- [PATCH v2 56/72] python/qmp: add QMPObject type alias, John Snow, 2020/11/03