Skip to content

BUG: Default value retrieval in numpy stile #110

Description

@nbeliy

I think that the extraction of default value from the numpy stile doc-string is broken.

If I have a docstring:

doc = """
Parameters
----------
a: str, optional
     bla bla
     Default is 'abc'.
"""

print(parse(doc).params[0].default)
'is'

The result is is and not the abc. I suspect that regexp parsing recover incorrect group.

I use dockstring_parser version 0.17.0 installed using pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions