-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Exception: 'DocstringReturn' object is not iterable #3
Comments
Hello @plannigan! Thank you for testing the new handler 🙂 Do you use the Sphinx docstring style (the one you implemented 😉)? I wonder if the docstring section is built correctly within this parser. I should definitely add some validation mechanisms for the values of sections. Or use proper class inheritance or something. |
Yes, it does use that docstring style. I took a quick look at the class defenitions. It doesn't look like there is something that should be iterated on (maybe |
What I meant is that the Python handler supports multiple documented return value, with optional names, and types, and that I probably didn't update the Sphinx parser in Griffe to build sections with a list rather than a single element. Concretely, the |
Is there documentation on what those expected types are? It is straight forward to make the Sphinx parser provide |
I understand, then let me improve the typing / documentation / validation mechanisms for docstrings sections first, because it's indeed lacking. I'll report back here 🙂 |
This helps to ensure we pass the right values when building them. This also fixes an issue in the Sphinx parser, where the returns section was not built correctly. Issue mkdocstrings/python#3: mkdocstrings/python#3
This helps to ensure we pass the right values when building them. This also fixes an issue in the Sphinx parser, where the returns section was not built correctly. Issue mkdocstrings/python#3: mkdocstrings/python#3
This helps to ensure we pass the right values when building them. This also fixes an issue in the Sphinx parser, where the returns section was not built correctly. Issue mkdocstrings/python#3: mkdocstrings/python#3
This helps to ensure we pass the right values when building them. This also fixes an issue in the Sphinx parser, where the returns section was not built correctly. Issue mkdocstrings/python#3: mkdocstrings/python#3 PR #52: #52
OK this should be fixed now! I'll release during this week (other bugfixes I can pack in). |
Describe the bug
I attempted to use the new docstring handler for Python. The first time I tried to generate the documentation I encountered an unhanded exception.
The end of the stack trace:
To Reproduce
This failed CI step demonstrate the failure.
Expected behavior
The API documentation is generated as it did with the previous handler.
System (please complete the following information):
mkdocstrings-python
version: 0.6.2The text was updated successfully, but these errors were encountered: