qemu-e2k/scripts/qapi
Daniel P. Berrangé e307a8174b qapi: provide a friendly string representation of QAPI classes
If printing a QAPI schema object for debugging we get the classname and
a hex value for the instance:

  <qapi.schema.QAPISchemaEnumType object at 0x7f0ab4c2dad0>
  <qapi.schema.QAPISchemaObjectType object at 0x7f0ab4c2dd90>
  <qapi.schema.QAPISchemaArrayType object at 0x7f0ab4c2df90>

With this change we instead get the classname and the human friendly
name of the QAPI type instance:

  <QAPISchemaEnumType:CpuS390State at 0x7f0ab4c2dad0>
  <QAPISchemaObjectType:CpuInfoS390 at 0x7f0ab4c2dd90>
  <QAPISchemaArrayType:CpuInfoFastList at 0x7f0ab4c2df90>

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20231018120500.2028642-1-berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Conditional swapped to avoid negation]
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[Tweaked to mollify pylint]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2023-10-19 07:21:37 +02:00
..
__init__.py
.flake8 qapi: Update flake8 config 2023-02-23 12:49:39 +01:00
.isort.cfg
commands.py qapi: Require boxed for conditional command and event arguments 2023-04-24 15:21:39 +02:00
common.py
error.py
events.py qapi: Start to elide redundant has_FOO in generated C 2022-12-13 18:31:37 +01:00
expr.py qapi: Fix to reject 'data': 'mumble' in struct 2023-04-24 15:21:39 +02:00
gen.py qapi: re-establish linting baseline 2023-10-19 07:02:29 +02:00
introspect.py
main.py qapi: Fix error message format regression 2023-04-24 15:09:10 +02:00
mypy.ini Python: Drop support for Python 3.7 2023-09-07 13:32:37 +02:00
parser.py qapi: re-establish linting baseline 2023-10-19 07:02:29 +02:00
pylintrc qapi: update pylint configuration 2023-02-23 12:49:39 +01:00
schema.py qapi: provide a friendly string representation of QAPI classes 2023-10-19 07:21:37 +02:00
source.py
types.py qapi: Start to elide redundant has_FOO in generated C 2022-12-13 18:31:37 +01:00
visit.py qapi: Fix code generated for optional conditional struct member 2023-04-24 15:21:39 +02:00