From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id B4879385829A for ; Mon, 11 Mar 2024 19:03:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B4879385829A Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B4879385829A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710183827; cv=none; b=ikGNTxBhnHb/SrdgolkyicfYeBv30J7pFyUTViK2ktDqv92KeeJNnSst+AkxkmW7yFOFTR8CC1HRg1ePIksclEahhu0A5x45eRiTIIOCL1IIVxip+B17jo1zVbsYYYacZ7LXyuVSF+era9Ml8ykzwNHHR9k1OYiB5bLdFVY18BE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710183827; c=relaxed/simple; bh=g8xx6ucNxfh26Fy2xgnaCo23zPI7mRum0c6sFDq8JPs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=VoXO8K6M0dAR/sSW41exIGPBMo9mBkzUN/cBkwDp7MbjJKGjtAJyRvKfd5xwneJk6ijzH+N/Vrf5UOTPYrC51nhmECG3RqblasEcD+SlUGjhCqno8yBZtTI1IrW46QLPzsz5DbZ9yTQbi4rctBNKGPi3SqSNh8U0v1nx9CR7Lc4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smarchi-efficios.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id EAD3C1E0D2; Mon, 11 Mar 2024 15:03:43 -0400 (EDT) From: Simon Marchi To: buildbot@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/8] autoregen.py: fix a pyright `reportConstantRedefinition` warning Date: Mon, 11 Mar 2024 15:01:14 -0400 Message-ID: <20240311190341.235331-3-simon.marchi@efficios.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240311190341.235331-1-simon.marchi@efficios.com> References: <20240311190341.235331-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3496.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_SOFTFAIL,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Not a big deal, and this is certainly opinionated, but pyright tells me: /home/smarchi/src/builder/builder/containers/autoregen.py /home/smarchi/src/builder/builder/containers/autoregen.py:24:1 - error: "ENV" is constant (because it is uppercase) and cannot be redefined (reportConstantRedefinition) Switch to a syntax that avoids redefinition of the variable. --- builder/containers/autoregen.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builder/containers/autoregen.py b/builder/containers/autoregen.py index 861a2ce79ef5..feee5878cac7 100755 --- a/builder/containers/autoregen.py +++ b/builder/containers/autoregen.py @@ -21,12 +21,15 @@ AUTOHEADER_BIN = next(name for name in autoheader_names if shutil.which(name)) # autoconf-wrapper and automake-wrapper from Gentoo look at this environment variable. # It's harmless to set it on other systems though. -ENV = f'WANT_AUTOCONF={AUTOCONF_BIN.split("-", 1)[1]} ' -ENV += f'WANT_AUTOMAKE={AUTOMAKE_BIN.split("-", 1)[1]} ' - -ENV += f" AUTOCONF={AUTOCONF_BIN} " -ENV += f" ACLOCAL={ACLOCAL_BIN} " -ENV += f" AUTOMAKE={AUTOMAKE_BIN}" +ENV = " ".join( + ( + f'WANT_AUTOCONF={AUTOCONF_BIN.split("-", 1)[1]}', + f'WANT_AUTOMAKE={AUTOMAKE_BIN.split("-", 1)[1]}', + f"AUTOCONF={AUTOCONF_BIN}", + f"ACLOCAL={ACLOCAL_BIN}", + f"AUTOMAKE={AUTOMAKE_BIN}", + ) +) # Directories we should skip entirely because they're vendored or have different -- 2.44.0