qemu-patch-raspberry4/scripts/qapi
John Snow 82b52f6b84 qapi/introspect.py: add type hint annotations
NB: The type aliases (SchemaInfo et al) declare intent for some of the
"dictly-typed" objects we pass around in introspect.py. They do not
enforce the shape of those objects, and cannot, until Python 3.7 or
later. (And even then, it may not be "worth it".)

Annotations are also added to the QAPISchemaEntity __init__ method in
schema.py to allow mypy to statically prove the type of typ.name,
needed to prove the return type of
QAPISchemaGenIntrospectVisitor._use_type().

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210216021809.134886-15-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Note on QAPISchemaEntity.__init__() squashed into commit message,
Comment wrapped to conform to PEP 8]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-02-18 19:45:20 +01:00
..
.flake8 qapi: delint using flake8 2020-10-10 11:37:47 +02:00
.isort.cfg qapi: enforce import order/styling with isort 2020-10-10 11:37:47 +02:00
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-02 13:14:09 -06:00
commands.py qapi: Replace List[str] with Sequence[str] for ifcond 2021-02-18 17:10:29 +01:00
common.py qapi/common.py: move build_params into gen.py 2020-10-10 11:37:48 +02:00
error.py qapi: Use super() now we have Python 3 2020-03-05 09:24:11 +01:00
events.py qapi: Replace List[str] with Sequence[str] for ifcond 2021-02-18 17:10:29 +01:00
expr.py qapi: enforce import order/styling with isort 2020-10-10 11:37:47 +02:00
gen.py qapi: Replace List[str] with Sequence[str] for ifcond 2021-02-18 17:10:29 +01:00
introspect.py qapi/introspect.py: add type hint annotations 2021-02-18 19:45:20 +01:00
main.py qapi/main: handle theoretical None-return from re.match() 2021-02-08 14:15:58 +01:00
mypy.ini qapi/introspect.py: add type hint annotations 2021-02-18 19:45:20 +01:00
parser.py qapi: enforce import order/styling with isort 2020-10-10 11:37:47 +02:00
pylintrc qapi/visit.py: remove unused parameters from gen_visit_object 2020-10-10 11:37:49 +02:00
schema.py qapi/introspect.py: add type hint annotations 2021-02-18 19:45:20 +01:00
source.py qapi/source.py: delint with pylint 2020-10-10 11:37:48 +02:00
types.py qapi: Replace List[str] with Sequence[str] for ifcond 2021-02-18 17:10:29 +01:00
visit.py qapi: Replace List[str] with Sequence[str] for ifcond 2021-02-18 17:10:29 +01:00