Skip to content

Enable --document-private-items for ruff_python_formatter#21903

Merged
ntBre merged 2 commits intomainfrom
brent/test-formatter-links
Dec 11, 2025
Merged

Enable --document-private-items for ruff_python_formatter#21903
ntBre merged 2 commits intomainfrom
brent/test-formatter-links

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Dec 10, 2025

Summary

I wanted to use a link to a preview function to help remember to update some
documentation in #21385, but I noticed that we weren't enforcing doc checks for
private items. I had Claude take the first stab here, but I ended up having to
go back through most of the changes to get the correct links.

The first commit makes everything compile, mostly by adding (path::to::item)
entries to the links, or removing brackets when the items aren't public enough.
There were only a couple of cases where I think things were renamed, and I tried
to find the new name for the type that was referenced (e.g.
FlatBinaryExpressionSlice).

The second commit rewraps the lines that were now too long and fixes a couple of
very small typos I noticed.

Test Plan

CI on this PR

Summary
--

I wanted to use a link to a preview function to help remember to update some
documentation in #21385, but I noticed that we weren't enforcing doc checks for
private items. I had Claude take the first stab here, but I ended up having to
go back through most of the changes to get the correct links.

The first commit makes everything compile, mostly by adding `(path::to::item)`
entries to the links, or removing brackets when the items aren't public enough.
There were only a couple of cases where I think things were renamed, and I tried
to find the new name for the type that was referenced (e.g.
`FlatBinaryExpressionSlice`).

The second commit rewraps the lines that were now too long and fixes a couple of
very small typos I noticed.

Test Plan
--

CI on this PR
@ntBre ntBre requested a review from MichaReiser as a code owner December 10, 2025 19:54
@ntBre ntBre added the internal An internal refactor or improvement label Dec 10, 2025
@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 10, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@ntBre ntBre merged commit c517277 into main Dec 11, 2025
39 checks passed
@ntBre ntBre deleted the brent/test-formatter-links branch December 11, 2025 13:23
dcreager added a commit that referenced this pull request Dec 11, 2025
* origin/main: (29 commits)
  Document range suppressions, reorganize suppression docs (#21884)
  Ignore ruff:isort like ruff:noqa in new suppressions (#21922)
  [ty] Handle `Definition`s in `SemanticModel::scope` (#21919)
  [ty] Attach salsa db when running ide tests for easier debugging (#21917)
  [ty] Don't show hover for expressions with no inferred type (#21924)
  [ty] avoid unions of generic aliases of the same class in fixpoint (#21909)
  [ty] Squash false positive logs for failing to find `builtins` as a real module
  [ty] Uniformly use "not supported" in diagnostics (#21916)
  [ty] Reduce size of ty-ide snapshots (#21915)
  [ty] Adjust scope completions to use all reachable symbols
  [ty] Rename `all_members_of_scope` to `all_end_of_scope_members`
  [ty] Remove `all_` prefix from some routines on UseDefMap
  Enable `--document-private-items` for `ruff_python_formatter` (#21903)
  Remove `BackwardsTokenizer` based `parenthesized_range` references in `ruff_linter` (#21836)
  [ty] Revert "Do not infer types for invalid binary expressions in annotations" (#21914)
  Skip over trivia tokens after re-lexing (#21895)
  [ty] Avoid inferring types for invalid binary expressions in string annotations (#21911)
  [ty] Improve overload call resolution tracing (#21913)
  [ty] fix missing heap_size on Salsa query (#21912)
  [ty] Support implicit type of `cls` in signatures (#21771)
  ...
dcreager added a commit that referenced this pull request Dec 11, 2025
* origin/main: (36 commits)
  [ty] Defer all parameter and return type annotations (#21906)
  [ty] Fix workspace symbols to return members too (#21926)
  Document range suppressions, reorganize suppression docs (#21884)
  Ignore ruff:isort like ruff:noqa in new suppressions (#21922)
  [ty] Handle `Definition`s in `SemanticModel::scope` (#21919)
  [ty] Attach salsa db when running ide tests for easier debugging (#21917)
  [ty] Don't show hover for expressions with no inferred type (#21924)
  [ty] avoid unions of generic aliases of the same class in fixpoint (#21909)
  [ty] Squash false positive logs for failing to find `builtins` as a real module
  [ty] Uniformly use "not supported" in diagnostics (#21916)
  [ty] Reduce size of ty-ide snapshots (#21915)
  [ty] Adjust scope completions to use all reachable symbols
  [ty] Rename `all_members_of_scope` to `all_end_of_scope_members`
  [ty] Remove `all_` prefix from some routines on UseDefMap
  Enable `--document-private-items` for `ruff_python_formatter` (#21903)
  Remove `BackwardsTokenizer` based `parenthesized_range` references in `ruff_linter` (#21836)
  [ty] Revert "Do not infer types for invalid binary expressions in annotations" (#21914)
  Skip over trivia tokens after re-lexing (#21895)
  [ty] Avoid inferring types for invalid binary expressions in string annotations (#21911)
  [ty] Improve overload call resolution tracing (#21913)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants