qemu/scripts/qapi
Markus Armbruster 8152bc7de6 qapi: Move conditional code from QAPISchemaVariants to its subtypes
QAPISchemaVariants.check()'s code is almost entirely conditional on
union vs. alternate type.

Move the conditional code to QAPISchemaBranches.check() and
QAPISchemaAlternatives.check(), where the conditions are always
satisfied.

Attribute QAPISchemaVariants.tag_name is now only used by
QAPISchemaBranches.  Move it there.

Refactor the three types' .__init__() to make them a bit simpler.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-05-06 12:38:27 +02:00
..
.flake8 qapi: Update flake8 config 2023-02-23 12:49:39 +01:00
.isort.cfg qapi: enforce import order/styling with isort 2020-10-10 11:37:47 +02:00
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-02 13:14:09 -06:00
commands.py qapi: Rename QAPISchemaObjectType.variants to .branches 2024-05-06 12:38:27 +02:00
common.py qapi: Avoid generating C identifier 'linux' 2022-07-13 12:19:18 +03:00
error.py qapi/error: Add type hints 2021-04-30 12:59:54 +02:00
events.py qapi: Rename QAPISchemaObjectType.variants to .branches 2024-05-06 12:38:27 +02:00
expr.py qapi: Fix to reject 'data': 'mumble' in struct 2023-04-24 15:21:39 +02:00
gen.py qapi: Rename QAPISchemaObjectType.variants to .branches 2024-05-06 12:38:27 +02:00
introspect.py qapi: Rename visitor parameter @variants to @alternatives 2024-05-06 12:38:27 +02:00
main.py qapi: Fix error message format regression 2023-04-24 15:09:10 +02:00
mypy.ini qapi/schema: turn on mypy strictness 2024-04-24 10:03:54 +02:00
parser.py qapi/parser.py: assert member.info is present in connect_member 2024-04-24 10:03:54 +02:00
pylintrc qapi/schema: add pylint suppressions 2024-04-24 10:03:54 +02:00
schema.py qapi: Move conditional code from QAPISchemaVariants to its subtypes 2024-05-06 12:38:27 +02:00
source.py qapi: Require member documentation (with loophole) 2024-02-12 10:04:31 +01:00
types.py qapi: Rename QAPISchemaObjectType.variants to .branches 2024-05-06 12:38:27 +02:00
visit.py qapi: Rename visitor parameter @variants to @alternatives 2024-05-06 12:38:27 +02:00