summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/mypy.ini
diff options
context:
space:
mode:
authorJohn Snow2021-02-16 03:18:04 +0100
committerMarkus Armbruster2021-02-18 19:45:20 +0100
commit82b52f6b84585f1ea2a6ceb9fc0f264e3b13ed48 (patch)
tree04f8ac136cb5df583b5f37b035e4aa77b0418e7c /scripts/qapi/mypy.ini
parentqapi/introspect.py: remove _gen_variants helper (diff)
downloadqemu-82b52f6b84585f1ea2a6ceb9fc0f264e3b13ed48.tar.gz
qemu-82b52f6b84585f1ea2a6ceb9fc0f264e3b13ed48.tar.xz
qemu-82b52f6b84585f1ea2a6ceb9fc0f264e3b13ed48.zip
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>
Diffstat (limited to 'scripts/qapi/mypy.ini')
-rw-r--r--scripts/qapi/mypy.ini5
1 files changed, 0 insertions, 5 deletions
diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini
index 04bd5db527..0a000d58b3 100644
--- a/scripts/qapi/mypy.ini
+++ b/scripts/qapi/mypy.ini
@@ -13,11 +13,6 @@ disallow_untyped_defs = False
disallow_incomplete_defs = False
check_untyped_defs = False
-[mypy-qapi.introspect]
-disallow_untyped_defs = False
-disallow_incomplete_defs = False
-check_untyped_defs = False
-
[mypy-qapi.parser]
disallow_untyped_defs = False
disallow_incomplete_defs = False