local options handling

This commit is contained in:
pbudzyns
2021-01-29 10:34:05 +01:00
parent ac5079ed85
commit 28a37c2936

View File

@@ -93,13 +93,12 @@ def process_documenter_options(documenter: "Type[Documenter]", config: Config, o
if options[name] is not None and options[name].startswith('+'):
options[name] = ','.join([config.autodoc_default_options[name],
options[name][1:]])
print(options[name])
else:
options[name] = config.autodoc_default_options[name]
elif isinstance(options.get(name), str) and options[name].startswith('+'):
# remove '+' from option argument if there's nothing to merge it with
options[name] = options[name][1:]
options[name] = options[name].strip('+')
return Options(assemble_option_dict(options.items(), documenter.option_spec))