[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections |
Date: |
Thu, 20 May 2021 16:42:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
John Snow <jsnow@redhat.com> writes:
> It simplifies the typing to say that _section is always a
> QAPIDoc.Section().
>
> To accommodate this change, we must allow for this object to evaluate to
> False for functions like _end_section which behave differently based on
> whether or not a Section has been started.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
>
> ---
>
> Probably a better fix is to restructure the code to prevent
> _end_section() from being called twice in a row, but that seemed like
> more effort, but if you have suggestions for a tactical fix, I'm open to
> it.
First step is to find out how _end_section() can be called twice in a
row. It isn't in all of "make check". Hmm.
[PATCH 4/6] qapi/parser.py: enable mypy checks, John Snow, 2021/05/19
[PATCH 1/6] qapi/parser.py: remove unused check_args_section arguments, John Snow, 2021/05/19
[PATCH 5/6] qapi/parser.py: Silence too-few-public-methods warning, John Snow, 2021/05/19
[PATCH 6/6] qapi/parser.py: enable pylint checks, John Snow, 2021/05/19
[PATCH 3/6] qapi/parser.py: add type hint annotations (QAPIDoc), John Snow, 2021/05/19