ConfigArgParse icon indicating copy to clipboard operation
ConfigArgParse copied to clipboard

excluding some parameters for write_config_file

Open AugustinVoiMa opened this issue 7 years ago • 1 comments

This is not actually an Issue, I just have not found so far how to properly exclude some parameters when writing configuration file. For example, with: parser = configargparse.ArgParser( default_config_files=[ config_file ]) parser.add("-p1", "--first-param") parser.add("-p2", "--sec-param") ns = parser.parse_known_args()[0] parser.write_config_file(ns, [config_file])

Is there a way to avoid first_param to be included in the config_file newly generated? Something like ns.remove("first_param") or parser.add("-p1", "--first-param", recordable=False) would be great, but from all I have tried, the only that works is del ns.first_param

So is there a such feature? Thanks

AugustinVoiMa avatar Jan 15 '18 17:01 AugustinVoiMa

There's no such feature currently.

bw2 avatar Feb 04 '18 19:02 bw2