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:
parent
0bda1f4c16
commit
5371be2b39
12 changed files with 58 additions and 63 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue