You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type hints are nice to check the code but it makes the documentation hard to read.
We should write a custom parser to display the hints in a cleaner way.
Similar issue we should probably fix at the same time: a lot of the docstrings still have types in them, even though the function has type annotations. This causes the types to appear twice in the generated documentation: once in the signature, and once in the parameter description.
This causes the types to appear twice in the generated documentation: once in the signature, and once in the parameter description.
Good point. In fact, at first, I started removing all type hints from the docstrings and using sphinx type hint plugin, but I stopped because it made the doc quite ugly.
Also, because of that, there are inconsistencies between docstrings and type hints... (that's also what I meant by "cleaning the docstrings")
Type hints are nice to check the code but it makes the documentation hard to read.
We should write a custom parser to display the hints in a cleaner way.
Related: https://michaelgoerz.net/notes/extending-sphinx-napoleon-docstring-sections.html
and https://github.com/agronholm/sphinx-autodoc-typehints
Update after #167: Above added. Remaining TODOs:
Regex used:
and replace with
$1
.The text was updated successfully, but these errors were encountered: