From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (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 finch.gentoo.org (Postfix) with ESMTPS id 4D115158030 for ; Wed, 1 Mar 2023 18:38:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5806BE077C; Wed, 1 Mar 2023 18:38:32 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3EEA1E077C for ; Wed, 1 Mar 2023 18:38:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 487C83408CF for ; Wed, 1 Mar 2023 18:38:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 92A358B6 for ; Wed, 1 Mar 2023 18:38:28 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1677695770.b9b5dc7dd1da1a659bc6987665e16c904d0271a9.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: tests/scripts/, src/pkgcheck/scripts/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: src/pkgcheck/scripts/pkgcheck_scan.py tests/scripts/test_pkgcheck_scan.py X-VCS-Directories: src/pkgcheck/scripts/ tests/scripts/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: b9b5dc7dd1da1a659bc6987665e16c904d0271a9 X-VCS-Branch: master Date: Wed, 1 Mar 2023 18:38:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f7208aba-8a5a-4e1f-8224-76266d28d4e4 X-Archives-Hash: a4e3f7755a4fb7a8a2acb728a8bd8b68 commit: b9b5dc7dd1da1a659bc6987665e16c904d0271a9 Author: Ulrich Müller gentoo org> AuthorDate: Tue Feb 28 09:05:21 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Wed Mar 1 18:36:10 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=b9b5dc7d scan: Replace NOCOLOR by NO_COLOR NO_COLOR is an informal standard that is followed by many programs, see https://no-color.org/. Signed-off-by: Ulrich Müller gentoo.org> Closes: https://bugs.gentoo.org/898230 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/scripts/pkgcheck_scan.py | 2 +- tests/scripts/test_pkgcheck_scan.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pkgcheck/scripts/pkgcheck_scan.py b/src/pkgcheck/scripts/pkgcheck_scan.py index b19afafb..9abfe2b5 100644 --- a/src/pkgcheck/scripts/pkgcheck_scan.py +++ b/src/pkgcheck/scripts/pkgcheck_scan.py @@ -401,7 +401,7 @@ def _setup_scan(parser, namespace, args): # load repo-specific args from config if they exist namespace = config_parser.parse_config_sections(namespace, namespace.target_repo.aliases) - if os.getenv("NOCOLOR"): + if os.getenv("NO_COLOR"): namespace.color = False return namespace, args diff --git a/tests/scripts/test_pkgcheck_scan.py b/tests/scripts/test_pkgcheck_scan.py index 7b1e5bdc..83ac7760 100644 --- a/tests/scripts/test_pkgcheck_scan.py +++ b/tests/scripts/test_pkgcheck_scan.py @@ -279,12 +279,12 @@ class TestPkgcheckScanParseArgs: ) args = ("scan", "--config", str(config_file)) - with os_environ("NOCOLOR"): + with os_environ("NO_COLOR"): assert parser.parse_args(args).color is True - with os_environ(NOCOLOR="1"): - # NOCOLOR overrides config file + with os_environ(NO_COLOR="1"): + # NO_COLOR overrides config file assert parser.parse_args(args).color is False - # cmd line option overrides NOCOLOR + # cmd line option overrides NO_COLOR assert parser.parse_args([*args, "--color", "n"]).color is False assert parser.parse_args([*args, "--color", "y"]).color is True