On 2/24/21 10:27 AM, Markus Armbruster wrote:
John Snow <js...@redhat.com> writes:

Annotations do not change runtime behavior.
This commit *only* adds annotations.

Signed-off-by: John Snow <js...@redhat.com>
Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>
Reviewed-by: Cleber Rosa <cr...@redhat.com>
---
  scripts/qapi/expr.py  | 71 ++++++++++++++++++++++++++++---------------
  scripts/qapi/mypy.ini |  5 ---
  2 files changed, 46 insertions(+), 30 deletions(-)

diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py
index f45d6be1f4c..df6c64950fa 100644
--- a/scripts/qapi/expr.py
+++ b/scripts/qapi/expr.py
@@ -15,7 +15,14 @@
  # See the COPYING file in the top-level directory.
import re
-from typing import MutableMapping, Optional, cast
+from typing import (
+    Iterable,
+    List,
+    MutableMapping,
+    Optional,
+    Union,
+    cast,
+)
from .common import c_name
  from .error import QAPISemError
@@ -23,9 +30,10 @@
  from .source import QAPISourceInfo
-# Expressions in their raw form are JSON-like structures with arbitrary forms.
-# Minimally, their top-level form must be a mapping of strings to values.
-Expression = MutableMapping[str, object]
+# Arbitrary form for a JSON-like object.
+_JSObject = MutableMapping[str, object]
+# Expressions in their raw form are (just) JSON-like objects.
+Expression = _JSObject

Wat?


Please read the "RFCs/notes" section of the cover letter. I wrote it for *you*!

--js


Reply via email to