ConfigArgParse
ConfigArgParse copied to clipboard
excluding some parameters for write_config_file
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
There's no such feature currently.