No documentation is rendered for the return type, if the function has no arguments. Compare the two functions defined below:
#|export
def foo1(
) -> int: # Return type documentation
"""Docstring"""
return 1
#|export
def foo2(
a, # test
) -> int: # Return type documentation
"""Docstring"""
return 1
The following documentation is rendered, after running nbdev_docs:
You can see that the return type is missing documentation in foo1.
You can find the reproduced bug in this repository:
https://github.com/lukastk/nbdev_method_doc_test