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

Question: does it raise for invalid docstrings? #35

Closed
julien-c opened this issue Jan 28, 2021 · 4 comments
Closed

Question: does it raise for invalid docstrings? #35

julien-c opened this issue Jan 28, 2021 · 4 comments

Comments

@julien-c
Copy link

Hi,

Thanks for your library it looks awesome. Does the parser raise an exception if the docstring's syntax is not correct Google-style syntax?

(Trying to build a simple docstring CI validation in my repo)

Thanks!

@Peter200lx
Copy link

Looks like this issue is hitting timothycrosley/pdocs#19 as well, ideally a misparse should be caught and raised as a docstring_parser.ParseError instead of the ValueError getting propagated up to the calling tool

@rr-
Copy link
Owner

rr- commented May 26, 2021

Sorry for the late reply. It's supposed to raise a ParseError, if it does not, it's an error and we need specific input to debug it.

@rr- rr- closed this as completed May 26, 2021
@Peter200lx
Copy link

Peter200lx commented May 26, 2021

Here is a poorly formatted doc string that would hit this:

def test(param: str) -> str:
    """This is a test

    Args:
        param - poorly formatted
    """
    return param

@rr-
Copy link
Owner

rr- commented May 26, 2021

Thanks @Peter200lx , I can confirm that 0.8 still had a problem with this kind of input and the package now raises a ParseError as of 0.8.1.

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

3 participants