Consider the following simple snippet:
def func(a: int) -> int:
"""A docstring.
args:
a: an integer.
returns:
An integer.
"""
return a
This triggers a D405 warning on line 4 -- it's unhappy that args: isn't Args:. However, it does NOT trigger a similar warning for the returns: section. If we get rid of the Args section then a D405 error is reported.
def func(a: int) -> int:
"""A docstring.
returns:
An integer.
"""
return a
I suspect that this is a bug (I wouldn't expect the presence of one section to have any impact on whether that section should be capitalized).