[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 36/38] qapi/visit.py: assert tag_member contains a QAPISch
From: |
Cleber Rosa |
Subject: |
Re: [PATCH v2 36/38] qapi/visit.py: assert tag_member contains a QAPISchemaEnumType |
Date: |
Thu, 24 Sep 2020 15:12:33 -0400 |
On Wed, Sep 23, 2020 at 06:13:30PM -0400, John Snow wrote:
> On 9/23/20 3:15 PM, Eduardo Habkost wrote:
> > On Tue, Sep 22, 2020 at 05:00:59PM -0400, John Snow wrote:
> > > Signed-off-by: John Snow <jsnow@redhat.com>
> >
> > This for making mypy happy, correct? An explanation in the commit
> > message would be nice.
> >
> > Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> >
>
> Yes, it's for mypy -- but it's a runtime visible change. Technically our
> type system isn't mature enough to express this constraint natively, so it's
> being carried around as developer knowledge.
>
> This formalizes that knowledge, albeit in a very crude way.
>
> I've amended the commit msg.
OK, this answers my previous question about why it was handled as an
assert.
- Cleber.
signature.asc
Description: PGP signature
- Re: [PATCH v2 24/38] qapi/gen.py: Fix edge-case of _is_user_module, (continued)
[PATCH v2 34/38] qapi/types.py: add type hint annotations, John Snow, 2020/09/22
[PATCH v2 38/38] qapi/visit.py: add type hint annotations, John Snow, 2020/09/22
[PATCH v2 31/38] qapi/introspect.py: add _gen_features helper, John Snow, 2020/09/22