Skip to content

Commit

Permalink
Clarify that D417 only checks docstrings with an arguments section (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
MichaReiser authored Mar 6, 2025
1 parent ce0018c commit a25be46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a25be46

Please sign in to comment.