Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sections with trailing spaces are not identified #20

Open
Chilipp opened this issue Sep 25, 2020 · 0 comments
Open

Sections with trailing spaces are not identified #20

Chilipp opened this issue Sep 25, 2020 · 0 comments
Assignees

Comments

@Chilipp
Copy link
Owner

Chilipp commented Sep 25, 2020

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 ''
@Chilipp Chilipp self-assigned this Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant