We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 584f856 commit 58d199fCopy full SHA for 58d199f
1 file changed
byexample/cmdline.py
@@ -222,6 +222,14 @@ def convert_arg_line_to_args(self, arg_line):
222
223
>>> parser.convert_arg_line_to_args('foo bar')
224
['foo bar']
225
+
226
+ Empty lines or lines that starts with a # are ignored.
227
228
+ >>> parser.convert_arg_line_to_args(' ')
229
+ []
230
231
+ >>> parser.convert_arg_line_to_args(' # foo ')
232
233
'''
234
arg_line = arg_line.lstrip()
235
if arg_line and arg_line[0] in self.prefix_chars:
@@ -249,6 +257,12 @@ def convert_arg_line_to_args(self, arg_line):
249
257
# Paste the flag with its value (or values) with a '='
250
258
return [flag + '=' + value]
251
259
260
+ if arg_line and arg_line[0] == '#':
261
+ return []
262
263
+ if not arg_line:
264
265
252
266
return [arg_line]
253
267
254
268
0 commit comments