qemu/scripts
John Snow 802a3e3f74 qapi/schema: assert resolve_type has 'info' and 'what' args on error
resolve_type() is generally used to resolve configuration-provided type
names into type objects, and generally requires valid 'info' and 'what'
parameters.

In some cases, such as with QAPISchemaArrayType.check(), resolve_type
may be used to resolve built-in types and as such will not have an
'info' argument, but also must not fail in this scenario.

Use an assertion to sate mypy that we will indeed have 'info' and 'what'
parameters for the error pathway in resolve_type.

Note: there are only three callsites to resolve_type at present where
"info" is perceived by mypy to be possibly None:

    1) QAPISchemaArrayType.check()
    2) QAPISchemaObjectTypeMember.check()
    3) QAPISchemaEvent.check()

    Of those three, only the first actually ever passes None; the other two
    are limited by their base class initializers which accept info=None, but
    neither subclass actually use a None value in practice, currently.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240315152301.3621858-12-armbru@redhat.com>
2024-04-24 10:03:54 +02:00
..
ci ci/gitlab-pipeline-status: correct typos 2024-02-21 08:16:57 +03:00
coccinelle cleanup: Tweak and re-run return_directly.cocci 2022-12-14 16:19:35 +01:00
codeconverter scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
coverage scripts/coverage: initial coverage comparison script 2023-04-04 15:16:29 +01:00
coverity-scan run-coverity-scan: add --check-upload-only option 2024-03-08 19:08:23 +01:00
kvm target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC 2023-09-21 10:39:51 +02:00
modules
oss-fuzz system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
performance scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
qapi qapi/schema: assert resolve_type has 'info' and 'what' args on error 2024-04-24 10:03:54 +02:00
qemu-guest-agent
qemugdb
qmp python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
simplebench scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
tracetool tracetool: avoid invalid escape in Python string 2023-11-09 15:03:02 +08:00
analyse-9p-simpletrace.py
analyse-locks-simpletrace.py scripts/analyse-locks-simpletrace.py: changed iteritems() to items() 2023-09-26 12:28:51 -04:00
analyze-inclusions
analyze-migration.py analyze-migration.py: Remove trick on parsing ramblocks 2024-01-29 11:02:12 +08:00
archive-source.sh make-release: do not ship dtc sources 2023-09-29 09:33:10 +02:00
block-coroutine-wrapper.py block-coroutine-wrapper: use qemu_get_current_aio_context() 2023-12-21 22:49:28 +01:00
check_sparse.py
checkpatch.pl scripts/checkpatch: Support codespell checking 2024-01-11 14:13:07 +01:00
clean-header-guards.pl disas: Remove libvixl disassembler 2022-07-05 10:15:49 +02:00
clean-includes scripts/clean-includes: Update exclude list 2024-01-30 21:20:20 +03:00
cleanup-trace-events.pl
cocci-macro-file.h
cpu-x86-uarch-abi.py scripts: drop comment about autogenerated CPU API file 2024-02-09 12:48:07 +00:00
decodetree.py tests/decode: Suppress "error: " string for expected-failure tests 2023-07-25 10:56:52 +01:00
device-crash-test python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
disas-objdump.pl
dump-guest-memory.py
entitlement.sh
extract-vsssdk-headers
feature_to_c.py gdbstub: Add members to identify registers to GDBFeature 2024-02-28 09:10:11 +00:00
fix-multiline-comments.sh
gensyscalls.sh linux-user: Add LoongArch syscall support 2022-07-04 11:08:57 +05:30
get_maintainer.pl scripts/get_maintainer.pl: don't print parentheses 2023-10-17 15:20:53 +02:00
git-submodule.sh scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour 2023-07-25 10:56:51 +01:00
git.orderfile scripts/git.orderfile: Display MAINTAINERS changes first 2023-01-13 16:22:57 +01:00
hxtool
kernel-doc
make-config-poison.sh exec/poison: Do not poison CONFIG_SOFTMMU 2023-06-05 12:04:29 -07:00
make-release make-release: switch to .xz format by default 2024-03-09 18:56:37 +03:00
meson-buildoptions.py meson-buildoptions: document the data at the top 2023-10-18 10:01:02 +02:00
meson-buildoptions.sh build-sys: add a "pixman" feature 2023-11-07 14:04:24 +04:00
meson.build scripts: add a XML preprocessor script 2023-06-27 17:08:56 +02:00
minikconf.py
modinfo-collect.py scripts: make sure scripts are invoked via $(PYTHON) 2023-05-19 20:40:29 +02:00
modinfo-generate.py scripts: make sure scripts are invoked via $(PYTHON) 2023-05-19 20:40:29 +02:00
mtest2make.py mtest2make: stop disabling meson test timeouts 2024-01-12 13:23:48 +00:00
nsis.py scripts/nsis.py: Automatically package required DLLs of QEMU executables 2022-10-31 10:06:11 +01:00
probe-gdb-support.py scripts: make sure scripts are invoked via $(PYTHON) 2023-05-19 20:40:29 +02:00
python_qmp_updater.py scripts: add python_qmp_updater.py 2023-10-12 14:21:44 -04:00
qapi-gen.py
qemu-binfmt-conf.sh scripts/qemu-binfmt-conf: Add LoongArch to qemu_get_family() 2022-07-05 16:17:53 +05:30
qemu-gdb.py
qemu-stamp.py meson, configure: move --with-pkgversion, CONFIG_STAMP to meson 2022-05-07 07:46:58 +02:00
qemu-trace-stap
qemu-version.sh
qom-cast-macro-clean-cocci-gen.py scripts: Add qom-cast-macro-clean-cocci-gen.py 2023-06-05 20:48:34 +02:00
refresh-pxe-roms.sh
render_block_graph.py python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
replay-dump.py scripts/replay_dump: track total number of instructions 2024-01-08 13:58:35 +00:00
shaderinclude.py build-sys: fix crlf-ending C code 2023-02-02 10:44:23 +00:00
signrom.py
simpletrace.py simpletrace: added simplified Analyzer2 class 2023-09-26 12:28:51 -04:00
symlink-install-tree.py Add information how to fix common build error on Windows in symlink-install-tree 2023-05-16 09:14:18 +02:00
tracetool.py tracetool: remove redundant --target-type / --target-name args 2024-03-12 14:52:07 -04:00
u2f-setup-gen.py
undefsym.py
update-linux-headers.sh linux-headers: riscv: add ptrace.h 2024-01-10 18:47:47 +10:00
update-mips-syscall-args.sh
update-syscalltbl.sh
userfaultfd-wrlat.py
vmstate-static-checker.py vmstate-static-checker: Recognize "num" field 2023-04-27 10:18:26 +02:00
xen-detect.c xen: Drop support for Xen versions below 4.7.1 2023-06-07 15:07:10 +01:00
xml-preprocess-test.py scripts: add a XML preprocessor script 2023-06-27 17:08:56 +02:00
xml-preprocess.py scripts/xml-preprocess: Make sure this script is invoked via the right Python 2023-10-12 00:37:39 +03:00