Our current docstring parser located at
returns a dictionary of the the docstring. It works but it is not as flexible and tolerant as the sphinx/napoleon implementation. Especially we have problems with the separator between a parameter name and its type; usually denoted by name : type. A different notation can not be parsed since we use a hardcoded split
|
for line in doc_lines[par_i: end_param_line][::-1]: |
|
if ' : ' in line: |
|
par_name, others_ = line.split(' : ') |
Improvements with using a regex did also not succeed. If possible we should incorporate the sphinx parser or at least get some ideas from their implementation.
Our current docstring parser located at
mdacli/src/mdacli/utils.py
Line 163 in 78fa3f2
returns a dictionary of the the docstring. It works but it is not as flexible and tolerant as the sphinx/napoleon implementation. Especially we have problems with the separator between a parameter name and its type; usually denoted by
name : type. A different notation can not be parsed since we use a hardcoded splitmdacli/src/mdacli/utils.py
Lines 230 to 232 in 78fa3f2
Improvements with using a regex did also not succeed. If possible we should incorporate the sphinx parser or at least get some ideas from their implementation.