[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 25/25] qapi: Dumb down QAPISchema.lookup_entity()
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v5 25/25] qapi: Dumb down QAPISchema.lookup_entity() |
Date: |
Mon, 18 Mar 2024 10:11:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Markus Armbruster <armbru@redhat.com> writes:
> QAPISchema.lookup_entity() takes an optional type argument, a subtype
> of QAPISchemaDefinition, and returns that type or None. Callers can
> use this to save themselves an isinstance() test.
>
> The only remaining user of this convenience feature is .lookup_type().
> But we don't actually save anything anymore there: we still the
we still need the
> isinstance() to help mypy over the hump.
>
> Drop the .lookup_entity() argument, and adjust .lookup_type().
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
- [PATCH v5 14/25] qapi/schema: assert info is present when necessary, (continued)
- [PATCH v5 14/25] qapi/schema: assert info is present when necessary, Markus Armbruster, 2024/03/15
- [PATCH v5 12/25] qapi: Assert built-in types exist, Markus Armbruster, 2024/03/15
- [PATCH v5 20/25] qapi/parser.py: assert member.info is present in connect_member, Markus Armbruster, 2024/03/15
- [PATCH v5 22/25] qapi/schema: turn on mypy strictness, Markus Armbruster, 2024/03/15
- [PATCH v5 15/25] qapi/schema: add _check_complete flag, Markus Armbruster, 2024/03/15
- [PATCH v5 19/25] qapi/parser: demote QAPIExpression to Dict[str, Any], Markus Armbruster, 2024/03/15
- [PATCH v5 08/25] qapi/schema: make c_type() and json_type() abstract methods, Markus Armbruster, 2024/03/15
- [PATCH v5 17/25] qapi/schema: fix typing for QAPISchemaVariants.tag_member, Markus Armbruster, 2024/03/15
- [PATCH v5 25/25] qapi: Dumb down QAPISchema.lookup_entity(), Markus Armbruster, 2024/03/15
- [PATCH v5 11/25] qapi/schema: assert resolve_type has 'info' and 'what' args on error, Markus Armbruster, 2024/03/15
- [PATCH v5 18/25] qapi/schema: assert inner type of QAPISchemaVariants in check_clash(), Markus Armbruster, 2024/03/15
- [PATCH v5 21/25] qapi/schema: add type hints, Markus Armbruster, 2024/03/15
- [PATCH v5 23/25] qapi/schema: remove unnecessary asserts, Markus Armbruster, 2024/03/15
- [PATCH v5 05/25] qapi: create QAPISchemaDefinition, Markus Armbruster, 2024/03/15
- [PATCH v5 01/25] qapi/parser: fix typo - self.returns.info => self.errors.info, Markus Armbruster, 2024/03/15
- [PATCH v5 07/25] qapi/schema: declare type for QAPISchemaArrayType.element_type, Markus Armbruster, 2024/03/15
- [PATCH v5 02/25] qapi/parser: shush up pylint, Markus Armbruster, 2024/03/15
- [PATCH v5 24/25] qapi: Tighten check whether implicit object type already exists, Markus Armbruster, 2024/03/15