aboutsummaryrefslogtreecommitdiff
path: root/scripts/test-driver.py
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-04-21 14:20:23 -0400
committerMarkus Armbruster <armbru@redhat.com>2021-04-30 12:59:54 +0200
commit7a783ce5b5a3ac4762b866e22370dd4fb30b91bf (patch)
tree65c8884bd2830681e1ca26a71a1d5feb70777951 /scripts/test-driver.py
parent4918bb7defbdcb1e27cc2adf4e1604486d778ece (diff)
downloadqemu-7a783ce5b5a3ac4762b866e22370dd4fb30b91bf.zip
qemu-7a783ce5b5a3ac4762b866e22370dd4fb30b91bf.tar.gz
qemu-7a783ce5b5a3ac4762b866e22370dd4fb30b91bf.tar.bz2
qapi/expr.py: Add casts in a few select cases
Casts are instructions to the type checker only, they aren't "safe" and should probably be avoided in general. In this case, when we perform type checking on a nested structure, the type of each field does not "stick". (See PEP 647 for an example of "type narrowing" that does "stick". It is available in Python 3.10, so we can't use it yet.) We don't need to assert that something is a str if we've already checked or asserted that it is -- use a cast instead for these cases. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20210421182032.3521476-9-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/test-driver.py')
0 files changed, 0 insertions, 0 deletions