qapi/introspect.py: improve readability of _tree_to_qlit
authorJohn Snow <jsnow@redhat.com>
Tue, 16 Feb 2021 02:18:02 +0000 (21:18 -0500)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 18 Feb 2021 18:45:20 +0000 (19:45 +0100)
commitc0e8d9f3c199357d89f362c54e1edced82c3c084
tree002b63fbdcf8549f3897fe130b9aab1bad442864
parent2a6c161bbf92a6259cb4b1687a0154492e78b8f5
qapi/introspect.py: improve readability of _tree_to_qlit

Subjective, but I find getting rid of the comprehensions helps. Also,
divide the sections into scalar and non-scalar sections, and remove
old-style string formatting.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210216021809.134886-13-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi/introspect.py