I always use type hints in function definitions, for example:
def foo(a: int, b: str) -> bool:
pass
When I use PyCharm auto docstring generator to make docstrings in my code, I get this:
def foo(a: int, b: str) -> bool:
"""
:param a:
:type a:
:param b:
:type b:
"""
pass
As you can see, the type values which I defined in the function itself have not been recognized by PyCharm, and I should write them in docstring again. How I can make PyCharm to auto-generate something like this for me (read type values from first line and insert them in the docstring):
def foo(a: int, b: str) -> bool:
"""
:param a:
:type a: int
:param b:
:type b: str
:rtype: bool
"""
pass