aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-08-31 14:38:05 +0200
committerMarkus Armbruster <armbru@redhat.com>2021-09-03 17:09:10 +0200
commitd0830ee443f2e27b62c40c9ac2d20b19c399ca4b (patch)
tree087048ff7aa0db64cd4a415fc25ea6d4c874b513
parenta7987799d1373d2408565d09823946ec28df4521 (diff)
downloadqemu-d0830ee443f2e27b62c40c9ac2d20b19c399ca4b.zip
qemu-d0830ee443f2e27b62c40c9ac2d20b19c399ca4b.tar.gz
qemu-d0830ee443f2e27b62c40c9ac2d20b19c399ca4b.tar.bz2
qapi: Use "not COND" instead of "!COND" for generated documentation
Generated documentation uses operators "and", "or", and "!". Change the latter to "not". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210831123809.1107782-9-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--scripts/qapi/common.py2
-rw-r--r--tests/qapi-schema/doc-good.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
index c7ccc7c..5f8f76e 100644
--- a/scripts/qapi/common.py
+++ b/scripts/qapi/common.py
@@ -233,7 +233,7 @@ def cgen_ifcond(ifcond: Optional[Union[str, Dict[str, Any]]]) -> str:
def docgen_ifcond(ifcond: Optional[Union[str, Dict[str, Any]]]) -> str:
# TODO Doc generated for conditions needs polish
- return gen_ifcond(ifcond, '%s', '!%s', ' and ', ' or ')
+ return gen_ifcond(ifcond, '%s', 'not %s', ' and ', ' or ')
def gen_if(cond: str) -> str:
diff --git a/tests/qapi-schema/doc-good.txt b/tests/qapi-schema/doc-good.txt
index 75f51a6..0c59d75 100644
--- a/tests/qapi-schema/doc-good.txt
+++ b/tests/qapi-schema/doc-good.txt
@@ -174,7 +174,7 @@ Features
If
~~
-"!(IFONE or IFTWO)"
+"not (IFONE or IFTWO)"
Another subsection