From nobody Thu Dec 18 00:30:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678293617; cv=none; d=zohomail.com; s=zohoarc; b=aXSAbGOcrSuAqOSfwJZ09y52VA92U06Q6fcib62zTEYjUjxJkGkGI2730a22uUMFjOg87LgdlL/ACMs22SA9EDuBEw60M2EKhMlc5FXpwOO6jgkpBuA/gg4L8f/w5UO32nfCTjXarUCivfQiBv2DjTQYxpuBv1YW5iTtYjOdyYQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678293617; h=Content-Type:Content-Transfer-Encoding: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=tGpoACLxGZGv+eNZYtCW8JIWdFJUflmoVDQsXVB1bns=; b=Czfa06ZV4IKJxznFKLefXZq0BYOFnAz35zBEBg/9X2BkerRR24mR53eCRJWUAjKONxH1aKADKj3pG6s79E6erzDyJ6HKQX5vnPUK0TLGkiscJzpGL5N2OIzfZFQq4Tn/dwqA4uwdPMq5gwC7r83bqdSy0HzmbnDFGWKa0dde4Qg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1678293617252702.308123278062; Wed, 8 Mar 2023 08:40:17 -0800 (PST) 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-625-qCFfGIkBNCy3QdN25yoxCQ-1; Wed, 08 Mar 2023 11:39:46 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB16E804BAA; Wed, 8 Mar 2023 16:39:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BBE52026D2B; Wed, 8 Mar 2023 16:39:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 55DCD194865C; Wed, 8 Mar 2023 16:39:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 21BAD19465B5 for ; Wed, 8 Mar 2023 16:39:18 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 060D51121314; Wed, 8 Mar 2023 16:39:18 +0000 (UTC) Received: from virtlab420.virt.lab.eng.bos.redhat.com (virtlab420.virt.lab.eng.bos.redhat.com [10.19.152.148]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF7FB1121330; Wed, 8 Mar 2023 16:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678293616; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tGpoACLxGZGv+eNZYtCW8JIWdFJUflmoVDQsXVB1bns=; b=aPaAo0Il3ey2Qvi7Gzt12Ys2Jz0Yiz07fw8dN3V6/RNx7Xow8zOHWpHTFM6YmCWQsVWBcY hAFkTVwAOizTwfp75+tU7VHMNZF6S91cHrUdC8aiL3sngbClQAojPuRUhd2CbCIkHl3ZUT vVm2jXj/EaarkP3EI/zpDKy9TtHN72Y= X-MC-Unique: qCFfGIkBNCy3QdN25yoxCQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [PATCH 02/16] build-aux: skip E203 and W503 flake8 checks Date: Wed, 8 Mar 2023 11:38:59 -0500 Message-Id: <20230308163913.338952-3-berrange@redhat.com> In-Reply-To: <20230308163913.338952-1-berrange@redhat.com> References: <20230308163913.338952-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678293618887100001 The flake8 check W503 does not want a line break before binary operator. This is contrary to the style that the 'black' formatting tool wants to use. Defer to 'black' as it is intended to be an opinionated formatting tool standardizing python code style, and thus not to be customized per project. The flake8 check E203 does not want whitespace before a ':'. This is, however, desirable when indexing array slices eg self.lookahead[skip : skip + 1] which is a format that 'black' produces. Signed-off-by: Daniel P. Berrang=C3=A9 --- build-aux/syntax-check.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 21f6b311ce..158f14e77e 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -568,15 +568,22 @@ sc_prohibit_python_without_env: =20 # We're intentionally ignoring a few warnings # +# E302: whitespace before ':'. This is something that is +# desirable when indexing array slices and is used by the +# 'black' formatting tool +# # E501: Force breaking lines at < 80 characters results in # some really unnatural code formatting which harms # readability. # +# W503: line break before binary operator, because this +# is contrary to what 'black' formatting tool wants +# # W504: Knuth code style requires the operators "or" and "and" etc # to be at the start of line in a multi-line conditional. # This the opposite to what is normal libvirt practice. # -FLAKE8_IGNORE =3D E501,W504 +FLAKE8_IGNORE =3D E203,E501,W503,W504 =20 sc_flake8: @if [ -n "$(FLAKE8)" ]; then \ --=20 2.39.1