Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allowing None to parse #88

@jamesbraza

Description

@jamesbraza

As of docstring_parser==0.16, parse is actually safe to being input None as the text.

Can we type hint it to allow this? That way, parse can be invoked on functions that don't have a __doc__ attribute:

from docstring_parser import parse

def foo():
    pass

parse(foo.__doc__)  # This is runtime safe, just needs to be type safe

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