[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/29] python: update for mypy 0.950
From: |
Paolo Bonzini |
Subject: |
[PULL 18/29] python: update for mypy 0.950 |
Date: |
Mon, 6 Jun 2022 16:36:33 +0200 |
From: John Snow <jsnow@redhat.com>
typeshed (included in mypy) recently updated to improve the typing for
WriteTransport objects. I was working around this, but now there's a
version where I shouldn't work around it.
Unfortunately this creates some minor ugliness if I want to support both
pre- and post-0.950 versions. For now, for my sanity, just disable the
unused-ignores warning.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220526000921.1581503-2-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
python/qemu/qmp/util.py | 4 +++-
python/setup.cfg | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/python/qemu/qmp/util.py b/python/qemu/qmp/util.py
index eaa5fc7d5f..ca6225e9cd 100644
--- a/python/qemu/qmp/util.py
+++ b/python/qemu/qmp/util.py
@@ -40,7 +40,9 @@ async def flush(writer: asyncio.StreamWriter) -> None:
drain. The flow control limits are restored after the call is
completed.
"""
- transport = cast(asyncio.WriteTransport, writer.transport)
+ transport = cast( # type: ignore[redundant-cast]
+ asyncio.WriteTransport, writer.transport
+ )
# https://github.com/python/typeshed/issues/5779
low, high = transport.get_write_buffer_limits() # type: ignore
diff --git a/python/setup.cfg b/python/setup.cfg
index e877ea5647..c2c61c7519 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -79,6 +79,7 @@ strict = True
python_version = 3.6
warn_unused_configs = True
namespace_packages = True
+warn_unused_ignores = False
[mypy-qemu.utils.qom_fuse]
# fusepy has no type stubs:
--
2.36.1
- [PULL 07/29] replay: notify vCPU when BH is scheduled, (continued)
- [PULL 07/29] replay: notify vCPU when BH is scheduled, Paolo Bonzini, 2022/06/06
- [PULL 06/29] replay: fix event queue flush for qemu shutdown, Paolo Bonzini, 2022/06/06
- [PULL 10/29] docs: convert docs/devel/replay page to rst, Paolo Bonzini, 2022/06/06
- [PULL 13/29] tests/avocado: add replay Linux tests for virtio machine, Paolo Bonzini, 2022/06/06
- [PULL 14/29] tests/avocado: add replay Linux test for Aarch64 machines, Paolo Bonzini, 2022/06/06
- [PULL 03/29] target/i386: Fix wrong count setting, Paolo Bonzini, 2022/06/06
- [PULL 05/29] modules: generates per-target modinfo, Paolo Bonzini, 2022/06/06
- [PULL 04/29] modules: introduces module_kconfig directive, Paolo Bonzini, 2022/06/06
- [PULL 09/29] replay: simplify async event processing, Paolo Bonzini, 2022/06/06
- [PULL 17/29] x86: cpu: fixup number of addressable IDs for logical processors sharing cache, Paolo Bonzini, 2022/06/06
- [PULL 18/29] python: update for mypy 0.950,
Paolo Bonzini <=
- [PULL 01/29] target/i386/tcg: Fix masking of real-mode addresses with A20 bit, Paolo Bonzini, 2022/06/06
- [PULL 08/29] replay: rewrite async event handling, Paolo Bonzini, 2022/06/06
- [PULL 15/29] tests/Makefile.include: Fix 'make check-help' output, Paolo Bonzini, 2022/06/06
- [PULL 20/29] tests: use python3 as the python executable name, Paolo Bonzini, 2022/06/06
- [PULL 19/29] tests: add "TESTS_PYTHON" variable to Makefile, Paolo Bonzini, 2022/06/06
- [PULL 11/29] docs: move replay docs to docs/system/replay.rst, Paolo Bonzini, 2022/06/06
- [PULL 22/29] tests: add quiet-venv-pip macro, Paolo Bonzini, 2022/06/06
- [PULL 23/29] tests: install "qemu" namespace package into venv, Paolo Bonzini, 2022/06/06
- [PULL 24/29] tests: use tests/venv to run basevm.py-based scripts, Paolo Bonzini, 2022/06/06
- [PULL 26/29] tests: run 'device-crash-test' from tests/venv, Paolo Bonzini, 2022/06/06