From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202508 header.b=cRAIm8bS; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id BC7005A061A for ; Thu, 02 Oct 2025 04:53:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1759373583; bh=W6bBMSQAmdgyDyvyf77ZV4oqVxnTpfjyXpyaGaL2yek=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cRAIm8bSUBvWh7YG0pGWlZQfLvxPOVJfP2UrIxZMoQM4Iwbi0aW72VXoaLnOcYqDi ODlWG41H585H768cb1jgYBycRgI4XF7RDyE02q4HjSq3SOi+lkahWGkWLyQm1PXGqE PblbSPrRFsVcA7LTkUyW9E8JeExIYYAmNxi9i+1+5NO/RKOpFSUkeOGCz8A2q0/cSE 9fMDyShQJo2kdjAZpLlqPp7vSyLRpCgeiQ0NuehNj1Ubuct411yvLfEo5AD/Jturob rikzcD0PXsBOeasZ7mQQHk5uPtgaeM5RJvVjCIPjhoGiGcd0DvERLJtmxk2eL0qIqp g5rJ6YKHskG4Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ccbvM2BdTz4wDG; Thu, 2 Oct 2025 12:53:03 +1000 (AEST) Date: Thu, 2 Oct 2025 11:31:29 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 2/6] test: Add linting of Python test scripts Message-ID: References: <20251001095202.3875003-1-david@gibson.dropbear.id.au> <20251001095202.3875003-3-david@gibson.dropbear.id.au> <20251001122351.7020b79a@elisabeth> <779811c8-ec8b-4426-86ca-4fbeb31769ee@redhat.com> <20251001124836.32ea603f@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hvBURd60lA97OEvb" Content-Disposition: inline In-Reply-To: <20251001124836.32ea603f@elisabeth> Message-ID-Hash: GEHBR63XG5PCHBO3NMC5E5YV27L7HH6Y X-Message-ID-Hash: GEHBR63XG5PCHBO3NMC5E5YV27L7HH6Y X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Holzinger , passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --hvBURd60lA97OEvb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 01, 2025 at 12:48:36PM +0200, Stefano Brivio wrote: > On Wed, 1 Oct 2025 12:40:09 +0200 > Paul Holzinger wrote: >=20 > > On 01/10/2025 12:23, Stefano Brivio wrote: > > > On Wed, 1 Oct 2025 19:51:58 +1000 > > > David Gibson wrote: > > > =20 > > >> We currently have one test moved to the new exeter based framwork wr= itten > > >> in Python. We plan to add many more, so add linting (flake8) and ty= pe > > >> checking (mypy) of those scripts. This can be invoked manually with > > >> "make flake8" or "make mypy" in test/, and is also added to the stat= ic > > >> checkers test set. =20 > > > I never used a Python linter, so I'm not sure if it's as bad as Go or > > > Rust linters taking the whole poetry away, as it happened for instance > > > in my most recent experience with 'cargo fmt': > > > > > > https://github.com/AsahiLinux/muvm/compare/68094c02c19b6f5d5e3def6= d29379c1244c9a5e4..9af11c334a1ce37f533c056d982f8608c8d80d27#diff-e1a95ce380= b9a8a317f97cccce1cbfd3dccd343dc62169ed1340208ab304fab9L106 > > > > > > https://github.com/AsahiLinux/muvm/pull/111#discussion_r1863551727 > > > (you need to click around before you get to it, no idea how to sha= re > > > a proper link that opens that comment right away) > > > > Not really on topic for this series but since you brought up rust there= =20 > > is actually a "#[rustfmt::skip]" attribute that can be used to skip the= =20 > > formatting selectively in case you need it in the future. >=20 > Ah, thanks, I didn't know about it. Now that you mention that, I just > found out that, with flake8, it looks like one can ignore the entire > file with "# flake8: noqa" on a line of its own: Right. More selective suppressions are also possible. I have exactly one in exeter, for a case where I really am doing something odd for testing reasons. Fwiw, I gave up on using pylint, a different linting tool, because it whinged too much. flake8 I've been fairly happy with. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --hvBURd60lA97OEvb Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjd1fAACgkQzQJF27ox 2Gd4oRAAn3Zz3FfJg6Yop2W2edFFKOnKzrlzPauTDchNudDqdMgqimLIUGqwOIRe N9+R22MBpB6D+9lL5qTlpc/C7t8Rpqfon8he9TzSj+W8Tn6I+GP8Iek5VxMC8RAr gyCkXVTT9tT52iTlUWKaE1CfNyKq8PmIpkggFsxWWisz7f87XvamTkgogH6KbuBc PrDKKOz2CYt3JJib/74ugCiTbL3FHzq0Eud2F9gbrKRJjYn92DL1NGGpTJyM6HbL jHV72bxfNUrJi7FKB7PccZ6eWfzi7TKZgW1hHFAanU86pPghj80aafgCsK0cC8Ww x2qAI5q4KQyoTZnZHOZrPw76KFQ8v1EQmMJqmjEUaP56Z/7JEhYAZdAdmKDj6RZV eefdg+EnqsyCPVobYYLsIdeAIcVOCk1jsBBBt8tn4eTW3pbzL9hbiflXAb7tGeS5 QehGV0IGd8Ktqlrlt5Ce1qIV/2FbBnoSHaYWozX6AL2595abis7RL/TPmKdY8Odp ypiA/H8raqKqj3hVIendkLE6o/D1swYhTgJ64rhfiI3z4GdFR7UAqpnxm7+qIZtD zbwODm+hisKSyV4DBPGgndFEO48mjHo8O8NjMkFc41in20bt0EbbfC2WnsQkaBZV j3pLhS+wWP4qoRsePBo80thpCF+zmIuQu/Q+0ChjmvsFWw2Yr18= =x5uP -----END PGP SIGNATURE----- --hvBURd60lA97OEvb--