From a25be4610a1fd3f7e9a4e593da9ccb25e1aae49a Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Thu, 6 Mar 2025 09:49:35 +0000 Subject: [PATCH] Clarify that D417 only checks docstrings with an arguments section (#16494) ## Summary This came up in https://github.com/astral-sh/ruff/issues/16477 It's not obvious from the D417 rule's documentation that it only checks docstrings with an arguments section. Functions without such a section aren't checked. This PR tries to make this clearer in the documentation. --- crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs b/crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs index 2535ac71ac..ca93a71c8d 100644 --- a/crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs +++ b/crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs @@ -1167,6 +1167,7 @@ impl AlwaysFixableViolation for MissingSectionNameColon { /// a blank line, followed by a series of sections, each with a section header /// and a section body. Function docstrings often include a section for /// function arguments; this rule is concerned with that section only. +/// Note that this rule only checks docstrings with an arguments (e.g. `Args`) section. /// /// This rule is enabled when using the `google` convention, and disabled when /// using the `pep257` and `numpy` conventions.