◐ Shell
clean mode source ↗

Fix pr-format CI to fail on formatting changes by youknowone · Pull Request #7411 · RustPython/RustPython

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: b77fa113-fbbb-42e6-9f34-61d3307fe276

📥 Commits

Reviewing files that changed from the base of the PR and between 61b3b4f and a14f856.

📒 Files selected for processing (3)
  • .github/workflows/pr-format.yaml
  • crates/stdlib/src/_tokenize.rs
  • crates/stdlib/src/lib.rs

📝 Walkthrough

Walkthrough

The PR enhances the formatting validation workflow by adding a check for uncommitted formatting changes that fails the job if detected, while reorganizing the stdlib tokenizer module declaration and applying formatting improvements to the tokenizer source file.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/pr-format.yaml
Adds a new "Check for formatting changes" step that detects uncommitted formatting diffs and fails the job with guidance. Updates "Post formatting suggestions" step to run conditionally on prior step failure.
Code Organization
crates/stdlib/src/lib.rs
Deduplicates tokenizer module declaration by moving it earlier in the file and removing the later duplicate occurrence.
Formatting & Style
crates/stdlib/src/_tokenize.rs
Applies formatting improvements including reorganized imports, converted multi-line statements to single-line equivalents, and tightened line breaks; no functional changes to logic or control flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hopping through the code with care,
Formatting checked at every layer,
Imports aligned and modules de-dup'd,
The CI pipeline's now all set up!
✨ Clean code hops on, ready to share!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.