summary refs log tree commit diff stats
path: root/tests/qapi-schema/test-qapi.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2024-03-15 16:28:22 +0100
committerMarkus Armbruster <armbru@redhat.com>2024-05-06 12:38:27 +0200
commitd1da8af897340ed3773c09add93c3b9f494f2c2b (patch)
treea406d5651347b7a14d7c3aec2be2a0b791124377 /tests/qapi-schema/test-qapi.py
parent1d067e3953e76af28ba20c995b176fcbcb7a10aa (diff)
downloadfocaccia-qemu-d1da8af897340ed3773c09add93c3b9f494f2c2b.tar.gz
focaccia-qemu-d1da8af897340ed3773c09add93c3b9f494f2c2b.zip
qapi: Rename visitor parameter @variants to @branches
The previous commit narrowed the type of .visit_object_type()
parameter @variants from QAPISchemaVariants to QAPISchemaBranches.
Rename it to @branches.

Same for .visit_object_type_flat().

A few of these pass @branches to helper functions:
QAPISchemaGenRSTVisitor.visit_object_type() to ._nodes_for_members()
and ._nodes_for_variant_when(), and
QAPISchemaGenVisitVisitor.visit_object_type() to
gen_visit_object_members().  Rename the helpers' @variants parameters
to @branches as well.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/test-qapi.py')
-rwxr-xr-xtests/qapi-schema/test-qapi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index 40095431ae..7c67ad8d9b 100755
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -48,7 +48,7 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
         self._print_if(ifcond)
 
     def visit_object_type(self, name, info, ifcond, features,
-                          base, members, variants):
+                          base, members, branches):
         print('object %s' % name)
         if base:
             print('    base %s' % base.name)
@@ -57,7 +57,7 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
                   % (m.name, m.type.name, m.optional))
             self._print_if(m.ifcond, 8)
             self._print_features(m.features, indent=8)
-        self._print_variants(variants)
+        self._print_variants(branches)
         self._print_if(ifcond)
         self._print_features(features)