#355 generate_directive_docs.py: allow `parameters` to be empty (or missing)
Closed: Fixed Opened by kparal.

In D915#inline-4578 we wanted to have parameters section to be empty. However, that is not currently possible, because generate_directive_docs.py does now allow it. If you use

parameters: {}

in a directive, you'll see:

$ doit builddocs 
.  builddocs
*** ERROR: The option_keys field can not be left blank.
make: *** [html] Error 1

If you erase the line completely, you'll see:

$ doit builddocs 
.  builddocs
Traceback (most recent call last):
  File "generate_directive_docs.py", line 458, in <module>
    main()
  File "generate_directive_docs.py", line 423, in main
    outputname)
  File "generate_directive_docs.py", line 363, in process_category
    module_map)
  File "generate_directive_docs.py", line 283, in process_module
    for (k, v) in doc['parameters'].iteritems():
KeyError: 'parameters'
make: *** [html] Error 1

Adjust generate_directive_docs.py to allow empty and/or missing parameters key. Also modify shell_directive.py and remove the fake parameter we had to put in to avoid this problem.


This ticket had assigned some Differential requests:
D915
D951

Metadata Update from @kparal:
- Issue tagged with: easyfix

Metadata