From nobody Tue Nov 18 07:22:10 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608170711; cv=none; d=zohomail.com; s=zohoarc; b=U9eGKP1T/G3JLYyE5w1r6sM29f086ec2bmia/LB0dazd0OO33UaDswXy5CSl1FWRHb/LBH1RNpdlvPdxxXqBQQXU3ej3Ewqu+f1b4tO4sA5CBgE9KHsl1e75hslCSmoa+HDMHAxtcb4mfP3iCST2UGD4YOmbP49COmp7DtTFP0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608170711; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SJ9IYkcUet9X5jxo9RQKcovqVr2pXoL0iYTwcE9VwJM=; b=RJtMaRZWf7GVvTabc8+gfGbLnE9DpqgL3TIhbsQuZAP4cWckQS8zFpw1ac+wDT+c9v4lgkOxpAFguer8UOyo5pcpcFKh9NIBmwdL8rNVl+hZ41rb84VHqrbj/9JCVFTkjT5MKMOC9AFimsKHFV+Pg95EuOmdriZGCMcliEoq0zE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608170711263876.8198600706188; Wed, 16 Dec 2020 18:05:11 -0800 (PST) Received: from localhost ([::1]:54130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpifG-0007Yj-7K for importer@patchew.org; Wed, 16 Dec 2020 21:05:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpiUT-0004AG-R6 for qemu-devel@nongnu.org; Wed, 16 Dec 2020 20:54:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:56454) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpiUS-0006KL-3O for qemu-devel@nongnu.org; Wed, 16 Dec 2020 20:54:01 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-432-BjDQ5Ca8Mj-yb7KVO8kYbA-1; Wed, 16 Dec 2020 20:53:57 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA585800D55 for ; Thu, 17 Dec 2020 01:53:56 +0000 (UTC) Received: from scv.redhat.com (ovpn-112-131.rdu2.redhat.com [10.10.112.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24F0760CE1; Thu, 17 Dec 2020 01:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608170039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SJ9IYkcUet9X5jxo9RQKcovqVr2pXoL0iYTwcE9VwJM=; b=Hwz9f3qphc1B5VBSs2f5NxTpKc9Z9RxFRfQaP/eDDidtPv9yoixfbYMk1Piq70GEpOfL4o bk8RfuTEfbHGfDDW3U3UsP4Or8u+rpBs6+r8Mwam0RYZKAF1ph2dl44x/YUv8GvutVOFe6 jfIJlOB3ljBvjzNgXke2CZv83M3DfKU= X-MC-Unique: BjDQ5Ca8Mj-yb7KVO8kYbA-1 From: John Snow To: Markus Armbruster , qemu-devel@nongnu.org Subject: [PATCH v3 13/13] qapi/introspect.py: Add docstring to _tree_to_qlit Date: Wed, 16 Dec 2020 20:53:43 -0500 Message-Id: <20201217015343.196279-14-jsnow@redhat.com> In-Reply-To: <20201217015343.196279-1-jsnow@redhat.com> References: <20201217015343.196279-1-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jsnow@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Snow , Eduardo Habkost , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: John Snow Reviewed-by: Cleber Rosa Signed-off-by: John Snow --- scripts/qapi/introspect.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index 428397a6954..8d5b8513fc8 100644 --- a/scripts/qapi/introspect.py +++ b/scripts/qapi/introspect.py @@ -1,10 +1,11 @@ """ QAPI introspection generator =20 -Copyright (C) 2015-2018 Red Hat, Inc. +Copyright (C) 2015-2020 Red Hat, Inc. =20 Authors: Markus Armbruster + John Snow =20 This work is licensed under the terms of the GNU GPL, version 2. See the COPYING file in the top-level directory. @@ -96,6 +97,13 @@ def __init__(self, value: _NodeT, ifcond: Iterable[str], def _tree_to_qlit(obj: TreeValue, level: int =3D 0, suppress_first_indent: bool =3D 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 suppress_first_indent: True for dict value children. + """ =20 def indent(level: int) -> str: return level * 4 * ' ' --=20 2.26.2