summaryrefslogtreecommitdiff
path: root/test/fixture
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2023-02-20 13:26:05 -0700
committerMats Wichmann <mats@linux.com>2023-04-14 10:16:29 -0600
commit6ce33bdadec1cf558a6d0df27a6a083516d6cf23 (patch)
treec6119695c63111cc8a1ae300c81c0597a3aa02de /test/fixture
parentc80cbb0846c5d9265f356e86c4e79f1d13e3e8a8 (diff)
downloadscons-git-6ce33bdadec1cf558a6d0df27a6a083516d6cf23.tar.gz
Minor cleanup ValidateOptions doc/code/test
Some nearby things in Main.py as well: - docstrings polished a bit, minor linting - move the list of predefined SConstruct file names into a constant defined at the top of the file, so it's a little less hidden, in the unlikely case of future changes. Manpage text and example revised a bit. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/fixture')
-rw-r--r--test/fixture/SConstruct-check-valid-options10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/fixture/SConstruct-check-valid-options b/test/fixture/SConstruct-check-valid-options
index 2c935a23c..53bdf89d3 100644
--- a/test/fixture/SConstruct-check-valid-options
+++ b/test/fixture/SConstruct-check-valid-options
@@ -1,3 +1,7 @@
+# SPDX-License-Identifier: MIT
+#
+# Copyright The SCons Foundation
+
import sys
from SCons.Script.SConsOptions import SConsOptionParser, SConsBadOptionError
@@ -12,8 +16,10 @@ elif ARGUMENTS.get('raise', 0) == '2':
try:
ValidateOptions(throw_exception=True)
except SConsBadOptionError as e:
- print("Parser is SConsOptionParser:%s" % (isinstance(e.parser, SConsOptionParser)))
- print("Message is :%s" % e.opt_str)
+ print(
+ f"Parser is SConsOptionParser: {isinstance(e.parser, SConsOptionParser)}"
+ )
+ print(f"Message is: {e.opt_str}")
Exit(3)
else:
ValidateOptions()