diff options
author | pbudzyns <pawel.budzynski@cern.ch> | 2021-01-25 18:07:18 +0300 |
---|---|---|
committer | pbudzyns <pawel.budzynski@cern.ch> | 2021-01-25 18:07:18 +0300 |
commit | ac5079ed851585acb754ce5fb1c8c486de60d6f6 (patch) | |
tree | 16a89cada9568dd74fc3348723e401b0ec16632b /sphinx/ext | |
parent | 381e30c23b0d72662ffec2658e699d020616e06f (diff) |
redundant '+' has no effect
Diffstat (limited to 'sphinx/ext')
-rw-r--r-- | sphinx/ext/autodoc/directive.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py index 32adc342d..2c82122fc 100644 --- a/sphinx/ext/autodoc/directive.py +++ b/sphinx/ext/autodoc/directive.py @@ -93,9 +93,14 @@ 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:] + return Options(assemble_option_dict(options.items(), documenter.option_spec)) |