Am 02.10.2026 um 09:04 hat Tim Pambor geschrieben: > mypy 2.4.0 infers the unannotated class attribute "shared_self = None" > as having type "None" and rejects the later assignment of a TestRunner > instance in run_tests_pool(): > > testrunner.py:126: error: Incompatible types in assignment > (expression has type "TestRunner", variable has type "None") > > Earlier mypy versions treated the attribute as a partial type and > accepted the assignment. Give the attribute an explicit > Optional['TestRunner'] annotation so both old and new mypy agree. > > Fixes tests/linters.py::TestLinters::test_mypy_iotests with mypy >= 2.4. > > Signed-off-by: Tim Pambor <[email protected]> > --- > CI run with mypy 2.4: https://gitlab.com/tpambor/qemu/-/pipelines/2905639361
Thanks, applied to the block branch. Kevin
