mkdocstrings / pytkdocs

Load Python objects documentation.
https://mkdocstrings.github.io/pytkdocs
ISC License
50 stars 32 forks source link

fix: warn about missing descriptions and return "" not `None` #138

Closed JoeHCQ1 closed 2 years ago

JoeHCQ1 commented 2 years ago

This should fix https://github.com/mkdocstrings/mkdocstrings/pull/397 and #137 .

The problem was that empty descriptions were being returned as None in Parameters and Exceptions 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:

JoeHCQ1 commented 2 years ago

@pawamoy I am ready for re-review.

pawamoy commented 2 years ago

Thanks a lot! Will release it now.

pawamoy commented 2 years ago

Released in 0.16.1