@@ -135,7 +135,8 @@ def _do_add(
135
135
option .default = default
136
136
option .validator = validator
137
137
option .converter = converter
138
- option .do_subst = kwargs .get ("subst" , True )
138
+ option .do_subst = kwargs .pop ("subst" , True )
139
+ # TODO should any remaining kwargs be saved in the Variable?
139
140
140
141
self .options .append (option )
141
142
@@ -158,21 +159,26 @@ def Add(
158
159
Arguments:
159
160
key: the name of the variable, or a 5-tuple (or list).
160
161
If *key* is a tuple, and there are no additional positional
161
- arguments, it is unpacked into the variable name plus the four
162
- listed keyword arguments from below .
162
+ arguments, it is unpacked into the variable name plus the
163
+ *help*, *default*, *validator* and *converter keyword args .
163
164
If *key* is a tuple and there are additional positional arguments,
164
165
the first word of the tuple is taken as the variable name,
165
166
and the remainder as aliases.
166
- args: optional positional arguments, corresponding to the four
167
- listed keyword arguments .
167
+ args: optional positional arguments, corresponding to the
168
+ *help*, *default*, *validator* and *converter keyword args .
168
169
kwargs: arbitrary keyword arguments used by the variable itself.
169
170
170
171
Keyword Args:
171
- help: help text for the variable (default: ``""`` )
172
+ help: help text for the variable (default: empty string )
172
173
default: default value for variable (default: ``None``)
173
174
validator: function called to validate the value (default: ``None``)
174
175
converter: function to be called to convert the variable's
175
176
value before putting it in the environment. (default: ``None``)
177
+ subst: if true perform substitution on the value before the converter
178
+ and validator functions (if any) are called (default: ``True``)
179
+
180
+ .. versionadded:: 4.8.0
181
+ The *subst* keyword argument is now specially recognized.
176
182
"""
177
183
if SCons .Util .is_Sequence (key ):
178
184
# If no other positional args (and no fundamental kwargs),
0 commit comments