Skip to content

gazelle/python: generate ruff_config and aspect_hints from the nearest ruff config (closes #6155) - #6417

Merged
TrapsterDK merged 1 commit into
mainfrom
fix-6155-ruff-config
Nov 4, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
fix-6155-ruff-config

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Closes #6155

  • Python Gazelle finds the nearest ruff config (.ruff.toml, ruff.toml, then pyproject.toml with [tool.ruff]), emits ruff_config there and adds its label to each generated rule's aspect_hints, keeping user entries.
  • dx init writes an empty root ruff.toml when Python sources exist and no ruff config is found (owner decision on gazelle: generated libraries are public unless the package sets default_visibility #6141).
  • Testdata ruff_pyproject and pyproject_no_ruff.

Tests: //gazelle/python:generation_test and python_test pass. Not moving the hint merge into common (small local merge instead). Unrelated red on main: //cli/adopt:dx_adopt_test overrides table, //gazelle/dispatch:dispatch_test conformance loads for other languages. No nested-Bazel tests run.

Assisted by Claude.

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9TXHDZrfmzFQ2WT8QAKK

…t ruff config; dx init writes an empty ruff.toml (closes #6155)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9TXHDZrfmzFQ2WT8QAKK
@TrapsterDK
TrapsterDK merged commit 2212d37 into main Nov 4, 2026
1 check failed
@TrapsterDK
TrapsterDK deleted the fix-6155-ruff-config branch November 4, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gazelle/python: generate ruff_config and aspect_hints from the nearest ruff config

1 participant