From nobody Tue Apr 16 22:47:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1675450108; cv=none; d=zohomail.com; s=zohoarc; b=BJlX9fMKbQMpaKJYC4P551Mi4hyDNIQ7fskf7Mh3I8xBefIdBVlNqKIdasnp5vnpNsc6EqdcEcDwXewA+Jn4cki/em3xGOb1gq9Ow7F3nOtxVx3QEeDshNlE7oRizpXJCCJTivbQ0ajoM2C50TN2D99uDa/6VUup0kpJKgg8ZzM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675450108; h=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=bQ/eI09BSxCRq3A8JaI0Boed1I3uWF4COyWsia1oT8U=; b=LdbTMfqvMse18jetorXxS0LnNlafHQoBDEj5Ssw8rp9hR1W9e+xgSa1Dz+Ofk/ZNJmSPv/ZRK/kIl+/OGyFFLgTQhmC+n1eKqu4LWBguoiDvUUHR8j4Ji/WWcx3VdJyoZbX6vFJfwXm02gv6gvAIWkBWGZ6PNRbTgS3WKk6l8QE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675450108545179.94188309267793; Fri, 3 Feb 2023 10:48:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pO165-000681-Ui; Fri, 03 Feb 2023 13:47:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO164-00067F-4K for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO162-0002gq-9A for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:39 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-25-SLjV9OXfMleADTe1f1oEow-1; Fri, 03 Feb 2023 13:47:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F4E3183B3C3; Fri, 3 Feb 2023 18:47:34 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id A442A2166B34; Fri, 3 Feb 2023 18:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675450057; 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=bQ/eI09BSxCRq3A8JaI0Boed1I3uWF4COyWsia1oT8U=; b=NSZlgLuS5LxX9+GL9D3i79vdIdUJYXB7rHObFnGdJW8iMa0RDhh6ji8j13/GL5wmPlfkKH lJqBg3RgiYp96uXpcuYJs6Kd0aiqE5m89AoDeoZ3EvHTHZuVhsbV5+SIGMNBqoeQGKeru3 f0O+MHdJ/gKQJ/eqcBRSELTN/1jCJz4= X-MC-Unique: SLjV9OXfMleADTe1f1oEow-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Michael Roth , Peter Maydell , Markus Armbruster , John Snow Subject: [PATCH v4 1/4] [DO-NOT-MERGE] docs: enable sphinx-autodoc for scripts/qapi Date: Fri, 3 Feb 2023 13:47:30 -0500 Message-Id: <20230203184733.523522-2-jsnow@redhat.com> In-Reply-To: <20230203184733.523522-1-jsnow@redhat.com> References: <20230203184733.523522-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.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_H2=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675450110783100003 Content-Type: text/plain; charset="utf-8" This is just POC to prove that the docstrings, where they are written, are correct to some minimum standard. It is included here for reviewing/testing convenience. Signed-off-by: John Snow --- docs/conf.py | 3 ++- docs/devel/index.rst | 1 + docs/devel/python/index.rst | 7 +++++++ docs/devel/python/qapi.commands.rst | 7 +++++++ docs/devel/python/qapi.common.rst | 7 +++++++ docs/devel/python/qapi.error.rst | 7 +++++++ docs/devel/python/qapi.events.rst | 7 +++++++ docs/devel/python/qapi.expr.rst | 7 +++++++ docs/devel/python/qapi.gen.rst | 7 +++++++ docs/devel/python/qapi.introspect.rst | 7 +++++++ docs/devel/python/qapi.main.rst | 7 +++++++ docs/devel/python/qapi.parser.rst | 8 ++++++++ docs/devel/python/qapi.rst | 26 ++++++++++++++++++++++++++ docs/devel/python/qapi.schema.rst | 7 +++++++ docs/devel/python/qapi.source.rst | 7 +++++++ docs/devel/python/qapi.types.rst | 7 +++++++ docs/devel/python/qapi.visit.rst | 7 +++++++ 17 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 docs/devel/python/index.rst create mode 100644 docs/devel/python/qapi.commands.rst create mode 100644 docs/devel/python/qapi.common.rst create mode 100644 docs/devel/python/qapi.error.rst create mode 100644 docs/devel/python/qapi.events.rst create mode 100644 docs/devel/python/qapi.expr.rst create mode 100644 docs/devel/python/qapi.gen.rst create mode 100644 docs/devel/python/qapi.introspect.rst create mode 100644 docs/devel/python/qapi.main.rst create mode 100644 docs/devel/python/qapi.parser.rst create mode 100644 docs/devel/python/qapi.rst create mode 100644 docs/devel/python/qapi.schema.rst create mode 100644 docs/devel/python/qapi.source.rst create mode 100644 docs/devel/python/qapi.types.rst create mode 100644 docs/devel/python/qapi.visit.rst diff --git a/docs/conf.py b/docs/conf.py index 73a287a4f27..154854d5c15 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -71,7 +71,8 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions =3D ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile', 'qapidoc'] +extensions =3D ['kerneldoc', 'qmp_lexer', 'hxtool', + 'depfile', 'qapidoc', 'sphinx.ext.autodoc'] =20 if sphinx.version_info[:3] > (4, 0, 0): tags.add('sphinx4') diff --git a/docs/devel/index.rst b/docs/devel/index.rst index 09cfb322beb..d4c66e9c8d7 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -14,3 +14,4 @@ modifying QEMU's source code. index-api index-internals index-tcg + python/index diff --git a/docs/devel/python/index.rst b/docs/devel/python/index.rst new file mode 100644 index 00000000000..31c470154b3 --- /dev/null +++ b/docs/devel/python/index.rst @@ -0,0 +1,7 @@ +qapi +=3D=3D=3D=3D + +.. toctree:: + :maxdepth: 4 + + qapi diff --git a/docs/devel/python/qapi.commands.rst b/docs/devel/python/qapi.c= ommands.rst new file mode 100644 index 00000000000..018f7b08a9c --- /dev/null +++ b/docs/devel/python/qapi.commands.rst @@ -0,0 +1,7 @@ +qapi.commands module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.commands + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.common.rst b/docs/devel/python/qapi.com= mon.rst new file mode 100644 index 00000000000..128a90d74be --- /dev/null +++ b/docs/devel/python/qapi.common.rst @@ -0,0 +1,7 @@ +qapi.common module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.common + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.error.rst b/docs/devel/python/qapi.erro= r.rst new file mode 100644 index 00000000000..980e32b63de --- /dev/null +++ b/docs/devel/python/qapi.error.rst @@ -0,0 +1,7 @@ +qapi.error module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.error + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.events.rst b/docs/devel/python/qapi.eve= nts.rst new file mode 100644 index 00000000000..1fce85b044e --- /dev/null +++ b/docs/devel/python/qapi.events.rst @@ -0,0 +1,7 @@ +qapi.events module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.events + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.expr.rst b/docs/devel/python/qapi.expr.= rst new file mode 100644 index 00000000000..0660270629c --- /dev/null +++ b/docs/devel/python/qapi.expr.rst @@ -0,0 +1,7 @@ +qapi.expr module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.expr + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.gen.rst b/docs/devel/python/qapi.gen.rst new file mode 100644 index 00000000000..7b495fd4bf2 --- /dev/null +++ b/docs/devel/python/qapi.gen.rst @@ -0,0 +1,7 @@ +qapi.gen module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.gen + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.introspect.rst b/docs/devel/python/qapi= .introspect.rst new file mode 100644 index 00000000000..f65ebfccd1b --- /dev/null +++ b/docs/devel/python/qapi.introspect.rst @@ -0,0 +1,7 @@ +qapi.introspect module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.introspect + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.main.rst b/docs/devel/python/qapi.main.= rst new file mode 100644 index 00000000000..1255fcda633 --- /dev/null +++ b/docs/devel/python/qapi.main.rst @@ -0,0 +1,7 @@ +qapi.main module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.main + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.parser.rst b/docs/devel/python/qapi.par= ser.rst new file mode 100644 index 00000000000..1a8f7b347eb --- /dev/null +++ b/docs/devel/python/qapi.parser.rst @@ -0,0 +1,8 @@ +qapi.parser module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.parser + :members: + :undoc-members: + :show-inheritance: + :private-members: diff --git a/docs/devel/python/qapi.rst b/docs/devel/python/qapi.rst new file mode 100644 index 00000000000..c762019aad3 --- /dev/null +++ b/docs/devel/python/qapi.rst @@ -0,0 +1,26 @@ +qapi package +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + + qapi.commands + qapi.common + qapi.error + qapi.events + qapi.expr + qapi.gen + qapi.introspect + qapi.main + qapi.parser + qapi.schema + qapi.source + qapi.types + qapi.visit diff --git a/docs/devel/python/qapi.schema.rst b/docs/devel/python/qapi.sch= ema.rst new file mode 100644 index 00000000000..a08f75ed720 --- /dev/null +++ b/docs/devel/python/qapi.schema.rst @@ -0,0 +1,7 @@ +qapi.schema module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.schema + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.source.rst b/docs/devel/python/qapi.sou= rce.rst new file mode 100644 index 00000000000..e61e9f60212 --- /dev/null +++ b/docs/devel/python/qapi.source.rst @@ -0,0 +1,7 @@ +qapi.source module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.source + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.types.rst b/docs/devel/python/qapi.type= s.rst new file mode 100644 index 00000000000..6eea827557d --- /dev/null +++ b/docs/devel/python/qapi.types.rst @@ -0,0 +1,7 @@ +qapi.types module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.types + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/devel/python/qapi.visit.rst b/docs/devel/python/qapi.visi= t.rst new file mode 100644 index 00000000000..84307cbc236 --- /dev/null +++ b/docs/devel/python/qapi.visit.rst @@ -0,0 +1,7 @@ +qapi.visit module +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. automodule:: qapi.visit + :members: + :undoc-members: + :show-inheritance: --=20 2.39.0 From nobody Tue Apr 16 22:47:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1675450108; cv=none; d=zohomail.com; s=zohoarc; b=Cs1ZOrjBUmGr3qeQUnNc3/A3CMgZB7ExfZ0Dzq6sVFRg9/j7Sa6nZZE/tdraIXZP+s0Jmh5MAg0zwUmKPFiNgmRX+Pod1BRnYO+vfhVnmX2y1Nk820v8fkVDB+c05zkx3RW+/X4kn4OkCwfOl8tS7D+gb0g9BbehQR4RIkzeHMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675450108; h=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=5+GyNRX2Vc2u0f01QjGFkHpzbEhjg2Zb3F7nPY2w4FY=; b=g9rYB5adfGBfB3DeQYP/Z4ZGUanIK5ol4NlGh23az80nLNQAd1zJPCMw8Cr/zW0v9GRBGAWnjVyqloDfqdut+7Csdhr4OicGybMOCe+5UQ6go+0S48WYiFhuCOEwjF95tNhmgxf/1Ej/MlHs5pq8dDBCOJf+9O3xwfJ3XdPtYfc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675450108528196.29612218114244; Fri, 3 Feb 2023 10:48:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pO167-00068U-72; Fri, 03 Feb 2023 13:47:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO164-00067e-K2 for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO162-0002gv-JN for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:40 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-97-HamMOjc-MqqjzAEmY799rg-1; Fri, 03 Feb 2023 13:47:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D2FC2817237; Fri, 3 Feb 2023 18:47:34 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C9D42166B34; Fri, 3 Feb 2023 18:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675450058; 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=5+GyNRX2Vc2u0f01QjGFkHpzbEhjg2Zb3F7nPY2w4FY=; b=Km/SAbeds/dAOgbr4MPemRuf404aHmp7S4Xm6BF4yO6jlMXdbyGUphKB15p2l+8vD+kqrr 1VJn8j2lRhmZBs+7XrjLe4ytaBZo787oiwfmVCrT9rXESElHEVZWkCVJn6mSpqaZcJY/Cs 9G/zSnMQkEP5lilW1AvHtoK8VNHruJ8= X-MC-Unique: HamMOjc-MqqjzAEmY799rg-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Michael Roth , Peter Maydell , Markus Armbruster , John Snow Subject: [PATCH v4 2/4] [DO-NOT-MERGE]: Add some ad-hoc linting helpers. Date: Fri, 3 Feb 2023 13:47:31 -0500 Message-Id: <20230203184733.523522-3-jsnow@redhat.com> In-Reply-To: <20230203184733.523522-1-jsnow@redhat.com> References: <20230203184733.523522-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.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_H2=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675450110798100006 Content-Type: text/plain; charset="utf-8" These aren't ready for upstream inclusion, because they do not properly manage version dependencies, execution environment and so on. These are just the tools I use in my Own Special Environment :tm: for testing and debugging. They've been tested only on Fedora 37 for right now, which means: Python 3.11.1 pylint 2.14.4-3.fc37 mypy 0.982-1.fc37 isort 5.10.1-5.fc37 flake8 5.0.3-1.fc37 The python packaging work does a more exhaustive treatment and exploration of minimum (and maximum) package requirements; the hope is that eventually these two series will converge and these dependencies will all be handled by configuration in qemu.git/python/. For now, this is just a baseline under one environment to give us some guidance. Signed-off-by: John Snow --- scripts/qapi-lint.sh | 29 +++++++++++++++++++++++++++++ scripts/qapi/Makefile | 5 +++++ 2 files changed, 34 insertions(+) create mode 100755 scripts/qapi-lint.sh create mode 100644 scripts/qapi/Makefile diff --git a/scripts/qapi-lint.sh b/scripts/qapi-lint.sh new file mode 100755 index 00000000000..2c2f2808ca6 --- /dev/null +++ b/scripts/qapi-lint.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -e + +if [[ -f qapi/.flake8 ]]; then + echo "flake8 --config=3Dqapi/.flake8 qapi/" + flake8 --config=3Dqapi/.flake8 qapi/ +fi +if [[ -f qapi/pylintrc ]]; then + echo "pylint --rcfile=3Dqapi/pylintrc qapi/" + pylint --rcfile=3Dqapi/pylintrc qapi/ +fi +if [[ -f qapi/mypy.ini ]]; then + echo "mypy --config-file=3Dqapi/mypy.ini qapi/" + mypy --config-file=3Dqapi/mypy.ini qapi/ +fi + +if [[ -f qapi/.isort.cfg ]]; then + pushd qapi + echo "isort -c ." + isort -c . + popd +fi + +pushd ../bin/git +make -j9 +make check-qapi-schema +make docs +make sphinxdocs +popd diff --git a/scripts/qapi/Makefile b/scripts/qapi/Makefile new file mode 100644 index 00000000000..314e8a5505e --- /dev/null +++ b/scripts/qapi/Makefile @@ -0,0 +1,5 @@ +check: + isort -c . + flake8 . + cd .. && pylint --rcfile=3Dqapi/pylintrc qapi + cd .. && mypy -p qapi --config-file=3Dqapi/mypy.ini --=20 2.39.0 From nobody Tue Apr 16 22:47:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1675450108; cv=none; d=zohomail.com; s=zohoarc; b=D6S0jWn4aZPWXn5m38zd7XbcgjZxB420d2QaHEz7dl4Of7e487ZWwl7233RIIJhhXo35MwfqVFFe1rzDWAMljXC1zXsHDDXPFJSiQX20MHHaiv41Jik73tKo8wbmUmFwLBjxKpfWFt3yFobGk2Hu4vT/FvPbVgwinJIQLMMXi+0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675450108; h=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=wXtUmbpi8/JYUlFY1aPH7/LIE1EVSztsOOEGSMpBDkk=; b=hLTJxhxJRQYObNvblcyQ5/5Du0h6E/FkyQ3+ybS1b7vZ321FebebJWKi+h3HvNq4R5f+c/51vAF8qhWR/yI//nNL09eytu2yzlQHkq1BGgK9cOo9Bfmj+1ojERBj9UwyHeMxi2LMf8mMbV4JW2EA2ckS2UGeuxhd68KyVLQYiSg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675450108552671.8167655369458; Fri, 3 Feb 2023 10:48:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pO168-00068m-LP; Fri, 03 Feb 2023 13:47:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO164-00067l-SU for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO163-0002h2-9T for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:40 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-139-dJch0iKkOu2MRobNDs9RCg-1; Fri, 03 Feb 2023 13:47:35 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA8A4101A55E; Fri, 3 Feb 2023 18:47:34 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A15A2166B34; Fri, 3 Feb 2023 18:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675450058; 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=wXtUmbpi8/JYUlFY1aPH7/LIE1EVSztsOOEGSMpBDkk=; b=A+D3ixalI7v5zZZdbaz4fDfKBNDGrkS9NCaBfqr3CVh2R1r2QV7C8XqZWf+lHlII7ac4WX eqxHRLryIf2x/shVMn58K2vez56mOW4uSYMd/1+SPWaxSSKBW+hp/tsjEsUepPXB57EF+Q OiNwdy/WhZd1LE9tZYpBkXRGzy0RUkk= X-MC-Unique: dJch0iKkOu2MRobNDs9RCg-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Michael Roth , Peter Maydell , Markus Armbruster , John Snow Subject: [PATCH v4 3/4] qapi: Update flake8 config Date: Fri, 3 Feb 2023 13:47:32 -0500 Message-Id: <20230203184733.523522-4-jsnow@redhat.com> In-Reply-To: <20230203184733.523522-1-jsnow@redhat.com> References: <20230203184733.523522-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.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_H2=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675450110792100004 Content-Type: text/plain; charset="utf-8" New versions of flake8 don't like same-line comments. (It's a version newer than what fc37 ships, but it still makes my life easier to fix it now.) Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- scripts/qapi/.flake8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/.flake8 b/scripts/qapi/.flake8 index 6b158c68b84..a873ff67309 100644 --- a/scripts/qapi/.flake8 +++ b/scripts/qapi/.flake8 @@ -1,2 +1,3 @@ [flake8] -extend-ignore =3D E722 # Prefer pylint's bare-except checks to flake8's +# Prefer pylint's bare-except checks to flake8's +extend-ignore =3D E722 --=20 2.39.0 From nobody Tue Apr 16 22:47:39 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1675450126; cv=none; d=zohomail.com; s=zohoarc; b=eewh89HAcihClVMmPrArCg6o9BgIAdstAXrfIpXNyk2GDm/U9FvN4Qxl2jQRQaZiN4tNHpIE0BdoVh42JeA4/7D2COdGLqyRz+aj9QjW+rPdQc78lbmv3Bs51j+qH8/a8m1oeKJhMyiRAHN4EXCm+juBbXTfC9vLSNTmIxU7UcA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675450126; h=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=XquLaFf7i0Nx8kyhZf3MFTHd5LBJao98pghnomVRqOs=; b=jmUHNW2ZmnVxEKCNPuDLJ+L9jBgrZEfuGE7jxaTC9fMAeFwyW+R3xIC1V6tVxD1Mr+AOZNGRZt+qtTUHdrvUWONd4mOqLEuVhA4epj0K/5D00tGeIEa49GfleRR0rHO7re/XQI6K9N7aaajXs9BlcshlNdJEB5ko0EfTtEbArYc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675450126249192.9814229075232; Fri, 3 Feb 2023 10:48:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pO168-00068q-RI; Fri, 03 Feb 2023 13:47:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO165-00067x-8o for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:41 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pO163-0002h7-Fi for qemu-devel@nongnu.org; Fri, 03 Feb 2023 13:47:41 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-241-JBh3zIEwP3eZt5HsrimSGw-1; Fri, 03 Feb 2023 13:47:35 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 02C27858F09; Fri, 3 Feb 2023 18:47:35 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id B63DF2166B34; Fri, 3 Feb 2023 18:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675450058; 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=XquLaFf7i0Nx8kyhZf3MFTHd5LBJao98pghnomVRqOs=; b=BmqhWxuMxqhIxHZ3GQ5BuxaTVgMJLNI/8BHG/hnciKQINYUHabFJ4JfJ4W28ftDN0+ZDjE jWSXOIOHcgNyc8t4UL7GjYWgL82bphh7CE+n9pkeGve7yQaHIoPJj04f1TDmgqNdQq4fc8 4wCsDfYC7C5IVGmv93PqHmVeDqepnDc= X-MC-Unique: JBh3zIEwP3eZt5HsrimSGw-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Michael Roth , Peter Maydell , Markus Armbruster , John Snow Subject: [PATCH v4 4/4] qapi: update pylint configuration Date: Fri, 3 Feb 2023 13:47:33 -0500 Message-Id: <20230203184733.523522-5-jsnow@redhat.com> In-Reply-To: <20230203184733.523522-1-jsnow@redhat.com> References: <20230203184733.523522-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.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_H2=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1675450126573100005 Content-Type: text/plain; charset="utf-8" Newer versions of pylint disable the "no-self-use" message by default. Older versions don't, though. If we leave the suppressions in, pylint yelps about useless options. Just tell pylint to shush. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- scripts/qapi/pylintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index a7246282030..90546df5345 100644 --- a/scripts/qapi/pylintrc +++ b/scripts/qapi/pylintrc @@ -23,6 +23,7 @@ disable=3Dfixme, too-many-statements, too-many-instance-attributes, consider-using-f-string, + useless-option-value, =20 [REPORTS] =20 --=20 2.39.0