Skip to content

Upgrade ruff to 0.16.5 and address new rules - #459

Merged
horgh merged 4 commits into
mainfrom
greg/stf-1328-ruff-is-upgraded-in-github-python-repos
Sep 10, 2026
Merged

Upgrade ruff to 0.16.5 and address new rules#459
horgh merged 4 commits into
mainfrom
greg/stf-1328-ruff-is-upgraded-in-github-python-repos

Conversation

@oschwald

@oschwald oschwald commented Sep 9, 2026

Copy link
Copy Markdown
Member

Dependabot's ruff 0.16 bump fails CI because 0.16 stabilized new rules and started formatting Python fences in Markdown. This PR bumps ruff and addresses the failures.

  • Bump ruff to 0.16.5 in uv.lock. The dependabot PR closes when this merges.
  • Ignore CPY001 (missing-copyright-notice). We do not want a copyright header on every file.
  • Suppress PLR0917 (too-many-positional-arguments) on the web-service client constructors and the minFraud models, where making the arguments keyword-only would break callers that pass them positionally. The existing PLR0913 suppressions do not cover the new rule.
  • Reformat the Python code blocks in Markdown. ruff 0.16 formats these by default.

Each change is its own commit.

STF-1328

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Reformatted a payment processor validation example for improved readability without changing its behavior.
  • Chores

    • Updated linting configuration to accommodate existing code patterns.
    • Adjusted lint-suppression annotations; application functionality remains unchanged.

oschwald and others added 4 commits September 9, 2026 22:22
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ruff 0.16 stabilized this rule. We do not want a copyright header on
every source file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ruff 0.16 stabilized too-many-positional-arguments. The existing PLR0913
suppressions do not cover it. Making these arguments keyword-only would
be a breaking change for callers that pass them positionally.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ruff 0.16 formats Python fences in Markdown files by default.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 9, 2026 22:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: bf3ef2f0-c40a-45ec-9ee0-cbbbb044b180

📥 Commits

Reviewing files that changed from the base of the PR and between 6902f9b and d10aff0.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • CLAUDE.md
  • pyproject.toml
  • src/minfraud/webservice.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates Ruff ignore settings, extends constructor lint suppressions, and reformats a _payment_processor validation example. No runtime behavior or public declarations change.

Changes

Lint and documentation cleanup

Layer / File(s) Summary
Ruff suppression updates
pyproject.toml, src/minfraud/webservice.py
Ruff ignores CPY001 globally and PLR0917 for src/minfraud/models.py. Both client constructors suppress PLR0917.
Validation example formatting
CLAUDE.md
The _payment_processor In example uses multiline list syntax with unchanged contents and behavior.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to d10af

This updates Ruff-related lint handling and reformats documentation without changing application behavior or public APIs. No merge-blocking production risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: upgrading Ruff to version 0.16.5 and addressing the resulting lint rules.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch greg/stf-1328-ruff-is-upgraded-in-github-python-repos

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

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

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

@horgh
horgh merged commit 3819c30 into main Sep 10, 2026
50 checks passed
@horgh
horgh deleted the greg/stf-1328-ruff-is-upgraded-in-github-python-repos branch September 10, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants