aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-02-28 10:05:21 +0100
committerArthur Zamarin <arthurzam@gentoo.org>2023-03-01 20:36:10 +0200
commitb9b5dc7dd1da1a659bc6987665e16c904d0271a9 (patch)
treef8992c8fb7032e01c0f9717e1be7c0ef004e6049
parentnew release 0.10.22 (diff)
downloadpkgcheck-b9b5dc7dd1da1a659bc6987665e16c904d0271a9.tar.gz
pkgcheck-b9b5dc7dd1da1a659bc6987665e16c904d0271a9.tar.bz2
pkgcheck-b9b5dc7dd1da1a659bc6987665e16c904d0271a9.zip
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 <ulm@gentoo.org> Closes: https://bugs.gentoo.org/898230 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--src/pkgcheck/scripts/pkgcheck_scan.py2
-rw-r--r--tests/scripts/test_pkgcheck_scan.py8
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