aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/schema.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-02-01 14:37:32 -0500
committerMarkus Armbruster <armbru@redhat.com>2021-02-08 14:15:58 +0100
commitec9697ab3fe2174a865d0ac2bbc572cbd5981d94 (patch)
treea825be1b98575e3616c2b2a769ed3a48566917c2 /scripts/qapi/schema.py
parent6f0e9c26dbae9ac18b89d359791008fe3432ca91 (diff)
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>
Diffstat (limited to 'scripts/qapi/schema.py')
0 files changed, 0 insertions, 0 deletions