1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

Mark internal configuration options and sections with underscore

This commit is contained in:
Unrud 2020-02-19 09:50:27 +01:00
parent 0bda1f4c16
commit 5371be2b39
12 changed files with 58 additions and 63 deletions

View file

@ -51,7 +51,7 @@ def run():
groups = {}
for section, values in config.DEFAULT_CONFIG_SCHEMA.items():
if values.get("_internal", False):
if section.startswith("_"):
continue
group = parser.add_argument_group(section)
groups[group] = []
@ -65,7 +65,7 @@ def run():
kwargs["dest"] = "%s_%s" % (section, option)
groups[group].append(kwargs["dest"])
del kwargs["value"]
if "internal" in kwargs:
with contextlib.suppress(KeyError):
del kwargs["internal"]
if kwargs["type"] == bool: