Open dsm-72 opened 1 year ago
Please see numpy format
class NumpyDocString(Mapping): """Parses a numpydoc string to an abstract representation """ sections = { 'Summary': [''], 'Extended': [], 'Parameters': [], 'Returns': [] } def __init__(self, docstring, config=None): docstring = textwrap.dedent(docstring).split('\n') self._doc = Reader(docstring) self._parsed_data = copy.deepcopy(self.sections) self._parse() self['Parameters'] = {o.name:o for o in self['Parameters']} if self['Returns']: self['Returns'] = self['Returns'][0] self['Summary'] = dedent_lines(self['Summary'], split=False) self['Extended'] = dedent_lines(self['Extended'], split=False)
Feel free to do a PR with any additions you need.
@jph00 okie
Please see numpy format