Skip to content

Commit a25be46

Browse files
authored
Clarify that D417 only checks docstrings with an arguments section (#16494)
## Summary This came up in #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.
1 parent ce0018c commit a25be46

File tree

1 file changed

+1
-0
lines changed
  • crates/ruff_linter/src/rules/pydocstyle/rules

1 file changed

+1
-0
lines changed

crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,7 @@ impl AlwaysFixableViolation for MissingSectionNameColon {
11671167
/// a blank line, followed by a series of sections, each with a section header
11681168
/// and a section body. Function docstrings often include a section for
11691169
/// function arguments; this rule is concerned with that section only.
1170+
/// Note that this rule only checks docstrings with an arguments (e.g. `Args`) section.
11701171
///
11711172
/// This rule is enabled when using the `google` convention, and disabled when
11721173
/// using the `pep257` and `numpy` conventions.

0 commit comments

Comments
 (0)