Searched hist:ec9697ab (Results 1 – 1 of 1) sorted by relevance
/openbmc/qemu/scripts/qapi/ |
H A D | commands.py | ec9697ab Mon Feb 01 13:37:32 CST 2021 John Snow <jsnow@redhat.com> qapi/commands: assert arg_type is not None When boxed is True, expr.py asserts that we must have arguments. Ultimately, this should mean that if boxed is True that arg_type should be defined. Mypy cannot infer this, and does not support 'stateful' type inference, e.g.: ``` if x: assert y is not None ... if x: y.etc() ``` does not work, because mypy does not statefully remember the conditional assertion in the second block. Help mypy out by creating a new local that it can track more easily. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210201193747.2169670-2-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
|