diff options
author | Mats Wichmann <mats@linux.com> | 2021-10-08 20:09:47 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-10-08 20:15:10 (GMT) |
commit | 9d16d44e020755c907431d608d02551c5f4bca22 (patch) | |
tree | bc7950c34a078cb1bbe0b0cc5456a34517fe4486 | |
parent | b88e4961c3152e2037e4a2c9e38b191414f31843 (diff) | |
download | SCons-9d16d44e020755c907431d608d02551c5f4bca22.zip SCons-9d16d44e020755c907431d608d02551c5f4bca22.tar.gz SCons-9d16d44e020755c907431d608d02551c5f4bca22.tar.bz2 |
Address review comments on Variables PR (#4031)
Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r-- | SCons/Variables/BoolVariable.py | 2 | ||||
-rw-r--r-- | SCons/Variables/PackageVariable.py | 12 | ||||
-rw-r--r-- | SCons/Variables/PathVariable.py | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/SCons/Variables/BoolVariable.py b/SCons/Variables/BoolVariable.py index b3c0dc4..d4a7de7 100644 --- a/SCons/Variables/BoolVariable.py +++ b/SCons/Variables/BoolVariable.py @@ -38,7 +38,7 @@ import SCons.Errors __all__ = ['BoolVariable',] -TRUE_STRINGS = ('y', 'yes', 'true', 't', '1', 'on' , 'all' ) +TRUE_STRINGS = ('y', 'yes', 'true', 't', '1', 'on' , 'all') FALSE_STRINGS = ('n', 'no', 'false', 'f', '0', 'off', 'none') diff --git a/SCons/Variables/PackageVariable.py b/SCons/Variables/PackageVariable.py index 43ce99d..58c8441 100644 --- a/SCons/Variables/PackageVariable.py +++ b/SCons/Variables/PackageVariable.py @@ -56,14 +56,16 @@ import SCons.Errors __all__ = ['PackageVariable',] -__enable_strings = ('1', 'yes', 'true', 'on', 'enable', 'search') -__disable_strings = ('0', 'no', 'false', 'off', 'disable') +ENABLE_STRINGS = ('1', 'yes', 'true', 'on', 'enable', 'search') +DISABLE_STRINGS = ('0', 'no', 'false', 'off', 'disable') -def _converter(val) -> bool: +def _converter(val): """ """ lval = val.lower() - if lval in __enable_strings: return True - if lval in __disable_strings: return False + if lval in ENABLE_STRINGS: + return True + if lval in DISABLE_STRINGS: + return False return val diff --git a/SCons/Variables/PathVariable.py b/SCons/Variables/PathVariable.py index 383c1f9..a5bf6c5 100644 --- a/SCons/Variables/PathVariable.py +++ b/SCons/Variables/PathVariable.py @@ -28,7 +28,7 @@ To be used whenever a user-specified path override setting should be allowed. Arguments to PathVariable are: * *key* - name of this option on the command line (e.g. "prefix") * *help* - help string for option - * *dflt* - default value for this option + * *default* - default value for this option * *validator* - [optional] validator for option value. Predefined are: * *PathAccept* - accepts any path setting; no validation |