Markus Armbruster <arm...@redhat.com> writes: > marcandre.lur...@redhat.com writes: > >> From: Marc-André Lureau <marcandre.lur...@redhat.com> >> >> Replace the simple list sugar form with a recursive structure that will >> accept other operators in the following commits (all, any or not). >> >> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
[...] >> diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py >> index cf98923fa6..b5187bfbca 100644 >> --- a/scripts/qapi/expr.py >> +++ b/scripts/qapi/expr.py >> @@ -259,14 +259,12 @@ def check_flags(expr: _JSONObject, info: >> QAPISourceInfo) -> None: >> >> def check_if(expr: _JSONObject, info: QAPISourceInfo, source: str) -> None: >> """ >> - Normalize and validate the ``if`` member of an object. >> + Validate the ``if`` member of an object. >> >> - The ``if`` member may be either a ``str`` or a ``List[str]``. >> - A ``str`` value will be normalized to ``List[str]``. >> + The ``if`` member may be either a ``str`` or a dict. >> >> :forms: >> - :sugared: ``Union[str, List[str]]`` >> - :canonical: ``List[str]`` >> + :canonical: ``Union[str, dict]`` > > John hasn't answered my question whether :forms: makes sensw without > :sugared:. If it doesn't, I can drop it in my tree. We have a bunch of check_FOO(). Some normalize, and have :forms:. Some don't, and don't have :forms:. This patch changes check_if() not to normalize. So far, it leaves a degenerate :forms: behind. Let's drop it. Can do in my tree. [...]