pydocstyle icon indicating copy to clipboard operation
pydocstyle copied to clipboard

D417 only triggers when section for arguments is defined

Open Mutantpenguin opened this issue 1 year ago • 0 comments

D417 "Missing argument descriptions in the docstring" only triggers when there is a section for arguments, but not when there is none.

If this behaviour is explicitely desired, the documentation should be specific about it.

But my team and myself think that a section for arguments should be enforced if D417 is enabled.

Examples

This does not trigger D417:

def my_function(my_arg: str) -> str:
	"""
	This does something.
	"""

	return my_arg

This does trigger D417:

def my_function(my_arg: str) -> str:
	"""
	This does something.

	Arguments:
	"""

	return my_arg

Version

6.3.0

Config

We use this:

convention=google
add-select = D204,D205,D206,D414,D416,D410
add-ignore = D212,D200,D202,D100,D101

But the same happens with just:

add-select = D417

Mutantpenguin avatar Jan 25 '23 12:01 Mutantpenguin