When using google style docstrings and type annotations there's a double up of the type hints.
Is there any community consensus on how to avoid this?
Annoying double up of types:
def sum(a: int, b: int) -> int:
""" blah blah
Args:
a (int): value 1
b (int): value 2
Returns:
int: summed values
"""
return a + b
Should types be left out of the docstring like this?
def sum(a: int, b: int) -> int:
""" blah blah
Args:
a: value 1
b: value 2
Returns:
summed values
"""
return a + b
I haven't seen anyone else mention this, but I can't be the only one unsure about the best approach here.