nicolashainaux / sphinx-autodoc-annotation

Use Python 3 annotations in sphinx-enabled docstrings
BSD 3-Clause "New" or "Revised" License
43 stars 5 forks source link

Build crashed on an empty docstring. Fixed. #1

Closed moigagoo closed 10 years ago

moigagoo commented 10 years ago

If an empty docstring was encountered, build would crash with IndexError (result was empty, so accessing its -1st element raised an error).

Additional checks added.

ghost commented 10 years ago

I can't reproduce the crash you write about. When I encounter empty docstrings, nothing happens. What version of Sphinx are you using?

moigagoo commented 10 years ago

I'm using Sphinx 1.2.2 with Python 3.4.

ghost commented 10 years ago

I finally found the time to reproduce the bug and I did so: One has to enable documentation of "undocumented members" with :undoc-members:. With this. I could reproduce the crash.

ghost commented 10 years ago

Oh, thanks for the patch by the way :)

moigagoo commented 10 years ago

Thanks for the great extension! Happy to be useful :-)