Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
This repository was 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

Description

@Mutantpenguin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions