@@ -385,12 +385,13 @@ def _log_all(self, repo_path: Optional[str] = None) -> Dict[str, Any]:
385
385
def parse_args (self : TapType ,
386
386
args : Optional [Sequence [str ]] = None ,
387
387
known_only : bool = False ,
388
- parse_config_files_with_shlex = False ) -> TapType :
388
+ legacy_config_parsing = False ) -> TapType :
389
389
"""Parses arguments, sets attributes of self equal to the parsed arguments, and processes arguments.
390
390
391
391
:param args: List of strings to parse. The default is taken from `sys.argv`.
392
392
:param known_only: If true, ignores extra arguments and only parses known arguments.
393
393
Unparsed arguments are saved to self.extra_args.
394
+ :legacy_config_parsing: If true, config files are parsed using `str.split` instead of `shlex.split`.
394
395
:return: self, which is a Tap instance containing all of the parsed args.
395
396
"""
396
397
# Prevent double parsing
@@ -399,10 +400,10 @@ def parse_args(self: TapType,
399
400
400
401
# Collect arguments from all of the configs
401
402
402
- if parse_config_files_with_shlex :
403
- splitter = lambda arg_string : split (arg_string , comments = True )
404
- else :
403
+ if legacy_config_parsing :
405
404
splitter = lambda arg_string : arg_string .split ()
405
+ else :
406
+ splitter = lambda arg_string : split (arg_string , comments = True )
406
407
407
408
config_args = [arg for args_from_config in self .args_from_configs for arg in splitter (args_from_config )]
408
409
0 commit comments