Skip to content

[pydocstyle] Improve discoverability of rules enabled for each convention#24973

Merged
ntBre merged 15 commits into
astral-sh:mainfrom
RafaelJohn9:15217-pydocstyle-convention-docs
Jun 1, 2026
Merged

[pydocstyle] Improve discoverability of rules enabled for each convention#24973
ntBre merged 15 commits into
astral-sh:mainfrom
RafaelJohn9:15217-pydocstyle-convention-docs

Conversation

@RafaelJohn9
Copy link
Copy Markdown

@RafaelJohn9 RafaelJohn9 commented May 2, 2026

Summary

Improves discoverability of pydocstyle convention-based rule filtering by moving the authoritative documentation from the FAQ into the lint.pydocstyle.convention settings reference, per #15217.
Closes #15217.

Test Plan

Documentation-only change no functional code modifications.

Verification steps:

  1. Ran cargo dev generate-docs to regenerate docs/settings.md and ruff.schema.json from updated docstrings

  2. Ran cargo fmt --all to ensure Rust formatting compliance

  3. Ran cargo clippy --workspace --all-targets --all-features -- -D warnings - no new warnings

  4. Served docs locally with uvx --with-requirements docs/requirements.txt -- mkdocs serve -f mkdocs.yml and verified:

    • The lint.pydocstyle.convention section renders with the new content
    • The FAQ back-reference links to the settings section as intended

    Screenshots

    /ruff/settings/#lint.pydocstyle

image

/ruff/faq/#does-ruff-support-numpy-or-google-style-docstrings

image

Adds per-convention D-rule exclusion lists and clearer examples to the
`lint.pydocstyle.convention` option, addressing discoverability.
Removes the duplicated convention rule-exclusion lists and TOML examples
from the FAQ, replacing them with a concise pointer to the
`lint.pydocstyle.convention` settings documentation.

This avoids content duplication after moving the authoritative explanation
to the settings reference (per astral-sh#15217), while preserving discoverability
for users who start from the FAQ.
Minor formatting cleanup
Regenerates ruff.schema.json with no content changes.
@MichaReiser MichaReiser added the documentation Improvements or additions to documentation label May 3, 2026
@MichaReiser MichaReiser changed the title 15217 pydocstyle convention docs pydocstyle convention docs May 3, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented May 3, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre
Copy link
Copy Markdown
Contributor

ntBre commented May 6, 2026

Thanks for working on this! Do you plan to address the test failures showing up in CI? I think it could also be helpful to update your test plan with screenshots of the locally-rendered docs.

I'll convert this back to a draft for now.

@ntBre ntBre marked this pull request as draft May 6, 2026 20:39
@RafaelJohn9
Copy link
Copy Markdown
Author

Hey @ntBre , sure, I'll do that 🤝 ,

@RafaelJohn9 RafaelJohn9 marked this pull request as ready for review May 9, 2026 07:16
@RafaelJohn9 RafaelJohn9 marked this pull request as draft May 12, 2026 05:22
@RafaelJohn9 RafaelJohn9 marked this pull request as ready for review May 12, 2026 07:40
Comment thread crates/ruff_workspace/src/options.rs Outdated
Comment thread crates/ruff_workspace/src/options.rs
Comment thread docs/faq.md
@RafaelJohn9
Copy link
Copy Markdown
Author

@ntBre , I've completed the requested changes 🤝

@ntBre ntBre changed the title pydocstyle convention docs [pydocstyle] Improve discoverability of rules enabled for each convention Jun 1, 2026
Copy link
Copy Markdown
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I'll just apply a couple of very small fixes. The first is just a phrasing nit, and then I noticed that D420 wasn't included in this list after #23537 and figured it was a good time to add it.

Comment thread crates/ruff_workspace/src/options.rs Outdated
Comment thread crates/ruff_workspace/src/options.rs Outdated
Co-authored-by: Brent Westbrook <[email protected]>
@ntBre ntBre enabled auto-merge (squash) June 1, 2026 14:28
@ntBre ntBre merged commit 7ef96be into astral-sh:main Jun 1, 2026
44 checks passed
carljm added a commit that referenced this pull request Jun 1, 2026
* main:
  [`pydocstyle`] Improve discoverability of rules enabled for each convention (#24973)
  [ty] Deduplicate retained use-def place states (#25450)
  [ty] reduce features of low-level crates depended on by `ty_python_semantic` (#25524)
  [ty] Fix narrowing enum literal unions by member identity (#25520)
  [ty] Test tagged union narrowing for named tuples (#25519)
  [ty] Disallow file-system access in `ty_python_core` (#25518)
  [ty] Nominal Tagged Union Narrowing (#24916)
  Commit `scripts/uv.lock` (#25517)
  Fix potential index out of range in `LineIndex` computation (#25492)
  [ty] Sync vendored typeshed stubs (#25514)
  [ty] Add disjointness for protocol method members (#25315)
  [ty] Use compact sets for more immutable fields (#25476)
  [ty] Derive `Default` for `FunctionDecoratorInference` (#25482)
  [ty] Ignore rejected assignments for synthesized bindings (#25340)
  [ty] Handle cycles in function decorator inference (#25475)
  docs: fix typo `bin/active` → `bin/activate` in tutorial (#25473)
  [ty] Narrow bound method overloads by receiver (#24707)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve discoverability of the pydocstyle rules as per the selected convention

3 participants