From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C15B2CD98E1 for ; Tue, 16 Jun 2026 14:19:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZUbX-0001Q3-1M; Tue, 16 Jun 2026 10:17:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZUbV-0001Ol-DI for qemu-devel@nongnu.org; Tue, 16 Jun 2026 10:17:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZUbR-0003xx-UI for qemu-devel@nongnu.org; Tue, 16 Jun 2026 10:17:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781619440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x2T3mztQYd/lufHIsQaXY9sZtENNHEaIpWH9pszoZCM=; b=Ctt0Xt7w6NA3ucNrt9XvJHoi09leHeXEz/wqH2nUbI5rWueOy7eTXHXWWEZXxZpRV9eq9q 2TI7DD4E4f3uZeuC/lahnU4qMfKEDYI2HmsbCvGnYhRkky3WXw639VzjGC/LOvw4uS3rbz fceLnlBEkszbhAOKnEjrN/0EU+TyLVA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-314-W_Ql9GmqN-S5qtLbXIad0Q-1; Tue, 16 Jun 2026 10:17:19 -0400 X-MC-Unique: W_Ql9GmqN-S5qtLbXIad0Q-1 X-Mimecast-MFC-AGG-ID: W_Ql9GmqN-S5qtLbXIad0Q_1781619438 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 56AF41955EB1 for ; Tue, 16 Jun 2026 14:17:18 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E64361954105 for ; Tue, 16 Jun 2026 14:17:17 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 4E57C21E6A07; Tue, 16 Jun 2026 16:17:15 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, John Snow Subject: [PULL 04/14] qapi/parser: remove unused QAPIDoc subsection members Date: Tue, 16 Jun 2026 16:17:05 +0200 Message-ID: <20260616141715.2974467-5-armbru@redhat.com> In-Reply-To: <20260616141715.2974467-1-armbru@redhat.com> References: <20260616141715.2974467-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: John Snow All users of the QAPIDoc object should be iterating over all_sections and not grabbing arbitrary subsections, if possible. Remove the 'body' and 'sections' members, as they are no longer used. Signed-off-by: John Snow Reviewed-by: Markus Armbruster Message-ID: <20260611042332.482979-4-jsnow@redhat.com> Reviewed-by: Markus Armbruster [Commit message tweaked] Signed-off-by: Markus Armbruster --- scripts/qapi/parser.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index c3cf33904e..b33edbba74 100644 --- a/scripts/qapi/parser.py +++ b/scripts/qapi/parser.py @@ -732,8 +732,6 @@ def __init__(self, info: QAPISourceInfo, symbol: Optional[str] = None): self.all_sections: List[QAPIDoc.Section] = [ QAPIDoc.Section(info, QAPIDoc.Kind.PLAIN) ] - # the body section - self.body: Optional[QAPIDoc.Section] = self.all_sections[0] # dicts mapping parameter/feature names to their description self.args: Dict[str, QAPIDoc.ArgSection] = {} self.features: Dict[str, QAPIDoc.ArgSection] = {} @@ -742,8 +740,6 @@ def __init__(self, info: QAPISourceInfo, symbol: Optional[str] = None): self.errors: Optional[QAPIDoc.Section] = None # "Since" section self.since: Optional[QAPIDoc.Section] = None - # sections other than .body, .args, .features - self.sections: List[QAPIDoc.Section] = [] def end(self) -> None: for section in self.all_sections: @@ -766,7 +762,6 @@ def ensure_untagged_section(self, info: QAPISourceInfo) -> None: # start new section section = self.Section(info, kind) - self.sections.append(section) self.all_sections.append(section) def new_tagged_section( @@ -790,7 +785,6 @@ def new_tagged_section( raise QAPISemError( info, "duplicated '%s' section" % kind) self.since = section - self.sections.append(section) self.all_sections.append(section) def _new_description( -- 2.54.0