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
My inclination has been to use both type annotations and type hints in the docstrings. Reasoning: Without the type hints, I would have to read the full docstring more often, so having the hint was a more efficient way to get a sense of the function or class, and without the docstring type annotations, the rendered documentation on the website seemed incomplete. If the rendered documentation is not too heavily compromised in utility were the type annotations removed, I would support the change.
From PEP 484. Confusingly the "annotation syntax" in this screenshot refer to type hints where the function is defined.
Context: it is possible to generate type information for Sphinx docs directly from type hints, rather than relying on docstrings. See https://github.com/tox-dev/sphinx-autodoc-typehints
I lean yes but want to hear what others think.
see e.g. executablebooks/MyST-Parser#228 (comment)
The text was updated successfully, but these errors were encountered: