-
-
Notifications
You must be signed in to change notification settings - Fork 31
fix: warn about missing descriptions and return "" not None
#138
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect investigation!
Thanks a lot for taking the time to find and fix the root cause of the issue 🙂
I've made a few suggestions and comments.
@pawamoy I am ready for re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks a lot! Will release it now. |
Released in 0.16.1 |
This should fix mkdocstrings/mkdocstrings#397 and #137 .
The problem was that empty descriptions were being returned as None in
Parameters
andExceptions
blocks instead of""
.That None eventually made it to this: https://github.com/mkdocstrings/mkdocstrings/blob/master/src/mkdocstrings/handlers/base.py#L219
And that passed it here: https://github.com/Python-Markdown/markdown/blob/master/markdown/core.py#L225
And later in that function we get a Nonetype error: https://github.com/Python-Markdown/markdown/blob/master/markdown/core.py#L248
Because we also were not recording empty descriptions as errors (which I believe mkdocstrings interprets and reports as warnings) there was nothing to tell the user why
python -m mkdocs build
had thrown a Nonetype error.So I:
""
instead ofNone
.