Skip to content

Sections with trailing spaces are not identified #20

@Chilipp

Description

@Chilipp

If you have a trailing space behind the section (e.g. "Parameters " instead of "Parameters"), docrep will not recognize the section. This should be fixed.

Example:

import docrep
d = docrep.DocstringProcessor()

@d.get_sections(base='test')
def test(i):
    '''Some test function
    
    Parameters 
    ----------
    i: int   
        some param
    '''
    pass

print(d.params["test.parameters"])  # gives ''

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions