[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 14/15] qapi/introspect.py: Add docstring to _tree_to_qlit
From: |
John Snow |
Subject: |
[PATCH v5 14/15] qapi/introspect.py: Add docstring to _tree_to_qlit |
Date: |
Wed, 3 Feb 2021 19:32:06 -0500 |
Signed-off-by: John Snow <jsnow@redhat.com>
---
scripts/qapi/introspect.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py
index 2a39726f40a..2b338abe2cf 100644
--- a/scripts/qapi/introspect.py
+++ b/scripts/qapi/introspect.py
@@ -97,6 +97,14 @@ def __init__(self, value: _NodeT, ifcond: Iterable[str],
def _tree_to_qlit(obj: TreeValue,
level: int = 0,
dict_value: bool = False) -> str:
+ """
+ Convert the type tree into a QLIT C string, recursively.
+
+ :param obj: The value to convert.
+ :param level: The indentation level for this particular value.
+ :param dict_value: True when the value being processed belongs to a
+ dict key; which suppresses the output indent.
+ """
def indent(level: int) -> str:
return level * 4 * ' '
--
2.29.2
- [PATCH v5 12/15] qapi/introspect.py: add type hint annotations, (continued)
[PATCH v5 13/15] qapi/introspect.py: add introspect.json dummy types, John Snow, 2021/02/03
[PATCH v5 08/15] qapi/introspect.py: Introduce preliminary tree typing, John Snow, 2021/02/03
[PATCH v5 14/15] qapi/introspect.py: Add docstring to _tree_to_qlit,
John Snow <=
[PATCH v5 15/15] qapi/introspect.py: Update copyright and authors list, John Snow, 2021/02/03