]> git.ipfire.org Git - thirdparty/qemu.git/commit
python:QEMUMachine: template typing for self returning methods
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 24 Aug 2021 08:38:47 +0000 (11:38 +0300)
committerHanna Reitz <hreitz@redhat.com>
Wed, 1 Sep 2021 12:03:47 +0000 (14:03 +0200)
commit15c3b863ee6393fa326c142b725cff88bb3e719e
tree0a955c26e8d739049e8656067d320518595773d3
parent3f3c9b4c9dcb462b2330e50cf81b9703288884ec
python:QEMUMachine: template typing for self returning methods

mypy thinks that return value of these methods in subclusses is
QEMUMachine, which is wrong. So, make typing smarter.

Suggested-by: John Snow <jsnow@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210824083856.17408-26-vsementsov@virtuozzo.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
python/qemu/machine/machine.py