Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

D417 only triggers when section for arguments is defined #626

Open
Mutantpenguin opened this issue Jan 25, 2023 · 0 comments
Open

D417 only triggers when section for arguments is defined #626

Mutantpenguin opened this issue Jan 25, 2023 · 0 comments

Comments

@Mutantpenguin
Copy link

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant