◐ Shell
reader mode source ↗
Skip to content

Ruff as part of PR auto-format#6421

Merged
youknowone merged 1 commit into
RustPython:mainfrom
ShaharNaveh:ruff-auto-format
Dec 12, 2025
Merged

Ruff as part of PR auto-format#6421
youknowone merged 1 commit into
RustPython:mainfrom
ShaharNaveh:ruff-auto-format

Conversation

@ShaharNaveh

@ShaharNaveh ShaharNaveh commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Enhanced continuous integration and pull request automation workflows with improved code quality verification and version tracking to maintain code standards throughout the development process.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 12, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Two GitHub Actions workflow files are modified to enhance Ruff linter integration. The CI workflow adds a version display flag to the Ruff action, while the PR auto-commit workflow introduces new Ruff format and import check steps into the code formatting pipeline.

Changes

Cohort / File(s) Change Summary
GitHub Actions Workflows - Ruff Tooling
​.github/workflows/ci.yaml, ​.github/workflows/pr-auto-commit.yaml
CI workflow: adds --version argument to ruff-action step for explicit version display. PR auto-commit workflow: introduces Ruff setup via astral-sh/ruff-action (v0.14.9), followed by ruff format and ruff check --select I --fix steps in the code formatting sequence.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Both changes are straightforward workflow configuration additions with no complex logic or cross-file coordination.
  • The pr-auto-commit.yaml additions introduce sequential Ruff steps that follow a clear pattern and should be verified for correct placement relative to existing cargo fmt execution.

Possibly related PRs

Suggested reviewers

  • youknowone

Poem

🐰 A rabbit hops through the CI,
With Ruff now checking every line so nigh,
Version flags shine, imports align,
Auto-commit workflows now refine! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: integrating Ruff into the PR auto-format workflow across both ci.yaml and pr-auto-commit.yaml files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hide comment

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/pr-auto-commit.yaml (1)

42-50: Auto-format now includes Ruff, but commit/PR message still says only cargo fmt --all.

Since ruff format and ruff check --select I --fix can change files, the commit message (Line 69) and sticky PR comment text (Line 80) will be misleading when Ruff makes edits. Consider updating them to mention Ruff as well (or use a generic “Auto-format” message).

📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49522e7 and 2275ef2.

📒 Files selected for processing (2)
  • .github/workflows/ci.yaml (1 hunks)
  • .github/workflows/pr-auto-commit.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T12:17:28.606Z
Learning: Applies to **/*.py : Use ruff for linting Python code
Learnt from: ShaharNaveh
Repo: RustPython/RustPython PR: 5932
File: .github/workflows/comment-commands.yml:18-24
Timestamp: 2025-07-10T10:08:43.330Z
Learning: In GitHub Actions workflows for the RustPython project, the maintainer ShaharNaveh prefers to keep workflows simple and doesn't mind if steps fail when the desired state is already achieved (e.g., user already assigned to an issue). Avoid suggesting complex error handling for edge cases they don't consider problematic.
📚 Learning: 2025-11-29T12:17:28.606Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T12:17:28.606Z
Learning: Applies to **/*.py : Use ruff for linting Python code

Applied to files:

  • .github/workflows/ci.yaml
  • .github/workflows/pr-auto-commit.yaml
📚 Learning: 2025-11-29T12:17:28.606Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T12:17:28.606Z
Learning: Applies to **/*.rs : Always run clippy to lint Rust code (`cargo clippy`) before completing tasks and fix any warnings or lints introduced by changes

Applied to files:

  • .github/workflows/pr-auto-commit.yaml
📚 Learning: 2025-11-29T12:17:28.606Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-29T12:17:28.606Z
Learning: Applies to **/*.rs : Follow the default rustfmt code style by running `cargo fmt` to format Rust code

Applied to files:

  • .github/workflows/pr-auto-commit.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Run snippets and cpython tests (macos-latest)
  • GitHub Check: Run snippets and cpython tests (ubuntu-latest)
  • GitHub Check: Run snippets and cpython tests (windows-latest)
  • GitHub Check: Check the WASM package and demo
  • GitHub Check: Run rust tests (windows-latest)
  • GitHub Check: Check Rust code with clippy
  • GitHub Check: Run rust tests (ubuntu-latest)
  • GitHub Check: Run snippets and cpython tests on wasm-wasi
  • GitHub Check: Run rust tests (macos-latest)
  • GitHub Check: Ensure compilation on various targets
🔇 Additional comments (1)
.github/workflows/ci.yaml (1)

321-330: Ruff installation step is correctly configured — action installs ruff on PATH despite args: "--version".

The args: "--version" parameter tells the action to only print the version after installing, rather than running linting checks. The action still installs ruff to PATH regardless of the args value, so subsequent steps (ruff check --diff and ruff format --check) will execute correctly. The version: "0.14.9" pin is properly specified and will be applied.

Hide details View details @youknowone youknowone merged commit 6f80505 into RustPython:main Dec 12, 2025
13 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Feb 27, 2026
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.

2 participants