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.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user