Skip to content

Bump ruff#182

Merged
ejfine merged 3 commits into
mainfrom
ruff-bump
Jul 16, 2026
Merged

Bump ruff#182
ejfine merged 3 commits into
mainfrom
ruff-bump

Conversation

@ejfine

@ejfine ejfine commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Why is this change necessary?

The ruff VS Code extension and the pre-commit hook were starting to fight

How does this change address the issue?

Bumps ruff pre-commit hook and vs code extension both to latest

What side effects does this change have?

Ruff formatting diff may occur sometimes downstream

How is this change tested?

python package template (and grandchild)

Other

moved Agent rule to avoid agents getting confused that test code had test coverage on it 🤪

Summary by CodeRabbit

  • Chores
    • Updated development container tooling and editor extensions to newer versions.
    • Refreshed pre-commit checks and formatting tools.
  • Documentation
    • Clarified coding guidelines by relocating a branch and coverage guidance item to the Code Style section.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@ejfine, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 589a0a46-a548-40e8-a5fa-c96e661b91ec

📥 Commits

Reviewing files that changed from the base of the PR and between 2ecd799 and 456e236.

📒 Files selected for processing (2)
  • extensions/context.py
  • template/extensions/context.py.jinja-base
📝 Walkthrough

Walkthrough

Updates development-container extension versions, refreshes five pre-commit hook revisions, and relocates a filtering guideline from Testing to Code Style.

Changes

Tooling and development configuration refresh

Layer / File(s) Summary
Devcontainer extension pins
.devcontainer/devcontainer.json, template/.devcontainer/devcontainer.json.jinja-base
Updates pinned VS Code extension versions and refreshes the devcontainer context hash.
Pre-commit repository pins
.pre-commit-config.yaml
Updates the pinned revisions and frozen version comments for five pre-commit repositories.
Filtering guideline placement
AGENTS.md
Moves the compound-guard filtering guideline into Code Style and removes its duplicate from Testing.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: zendern

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately points to the Ruff version bump, which is a major part of the change.
Description check ✅ Passed The description covers the required sections well, with only the issue/message thread link section left empty.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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.

@ejfine
ejfine requested a review from zendern July 16, 2026 16:13
@ejfine
ejfine marked this pull request as ready for review July 16, 2026 16:13

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.pre-commit-config.yaml:
- Line 45: Update both pre-commit revision pins in .pre-commit-config.yaml:
replace the rev at lines 45 and 181 with the revisions specified by the review
comment, preserving the existing frozen-version comments and configuration
structure.

In `@AGENTS.md`:
- Line 18: Update the filtering-logic guideline in AGENTS.md to say that
compound boolean filters hide individual branches from branch coverage,
replacing the reference to line coverage while preserving the existing loop and
explicit if/continue recommendation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0dbbd883-05c8-4e07-8ef6-9ed1f7ef3f80

📥 Commits

Reviewing files that changed from the base of the PR and between 64d80cd and 2ecd799.

📒 Files selected for processing (4)
  • .devcontainer/devcontainer.json
  • .pre-commit-config.yaml
  • AGENTS.md
  • template/.devcontainer/devcontainer.json.jinja-base

Comment thread .pre-commit-config.yaml
# Reformatting (should generally come before any file format or other checks, because reformatting can change things)
- repo: https://github.com/crate-ci/typos
rev: 359573a3ff38f71c93e160f2ace96d118f6ff42e # frozen: v1
rev: 96d9af6217dc2855210655af7e1ff19d23d4e593 # frozen: v1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '35,55p;170,190p' .pre-commit-config.yaml

Repository: LabAutomationAndScreening/copier-base-template

Length of output: 1575


🏁 Script executed:

set -euo pipefail

for repo_tag in \
  "crate-ci/typos:v1" \
  "python-jsonschema/check-jsonschema:0.37.4"
do
  repo="${repo_tag%%:*}"
  tag="${repo_tag#*:}"
  echo "== $repo @ $tag =="

  if command -v gh >/dev/null 2>&1; then
    ref_json="$(gh api "repos/${repo}/git/refs/tags/${tag}")"
    ref_type="$(printf '%s' "$ref_json" | jq -r '.object.type')"
    ref_sha="$(printf '%s' "$ref_json" | jq -r '.object.sha')"
    if [ "$ref_type" = "tag" ]; then
      commit_sha="$(gh api "repos/${repo}/git/tags/${ref_sha}" | jq -r '.object.sha')"
    else
      commit_sha="$ref_sha"
    fi
  else
    echo "gh not available"
    exit 1
  fi

  echo "tag_commit=$commit_sha"
  gh api "repos/${repo}/commits/${commit_sha}" --jq '.sha'
  echo
done

Repository: LabAutomationAndScreening/copier-base-template

Length of output: 448


Replace both pre-commit rev pins

  • .pre-commit-config.yaml#L45: rev: bee27e3a4fd1ea2111cf90ab89cd076c870fce14 # frozen: v1
  • .pre-commit-config.yaml#L181: rev: 6b63472e72e1a91ed8a2f6d483790dfb644fa1d3 # frozen: 0.37.4
📍 Affects 1 file
  • .pre-commit-config.yaml#L45-L45 (this comment)
  • .pre-commit-config.yaml#L181-L181
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.pre-commit-config.yaml at line 45, Update both pre-commit revision pins in
.pre-commit-config.yaml: replace the rev at lines 45 and 181 with the revisions
specified by the review comment, preserving the existing frozen-version comments
and configuration structure.

Comment thread AGENTS.md
- When disabling a linting rule with an inline directive, provide a comment at the end of the line (or on the line above for tools that don't allow extra text after an inline directive) describing the reasoning for disabling the rule.
- Avoid telling the type checker what a type is rather than letting it prove it. This includes type assertions (`as SomeType` in TypeScript, `cast()` in Python) and variable annotations that override inference. Prefer approaches that let the type checker verify the type itself: `isinstance`/`instanceof` narrowing, restructuring code so the correct type flows naturally, or using discriminated unions. When there is genuinely no alternative, add a comment explaining why the workaround is necessary and why it is safe.
- Avoid `||` (TypeScript) or `or` (Python) in `if`/`elif` conditions, and avoid `x in ['a', 'b']`-style membership tests in implementation code — coverage tools treat these as a single branch, silently masking untested paths and producing false 100% branch coverage. Use separate `if`/`elif` branches instead so each condition is independently covered.
- When filtering logic combines multiple `and`-joined guards (e.g. a null check alongside a value check), prefer a loop with explicit `if`/`continue` branches over a single-line comprehension. A compound boolean filter on one line hides individual branches from line coverage — each guard condition should be its own statement so missing test cases are surfaced.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

git ls-files AGENTS.md

Repository: LabAutomationAndScreening/copier-base-template

Length of output: 194


🏁 Script executed:

cat -n AGENTS.md | sed -n '1,120p'

Repository: LabAutomationAndScreening/copier-base-template

Length of output: 14555


🏁 Script executed:

cat -n AGENTS.md

Repository: LabAutomationAndScreening/copier-base-template

Length of output: 17407


🏁 Script executed:

rg -n "branch coverage|line coverage|coverage" AGENTS.md .github package.json pyproject.toml jest.config.* vitest.config.* pytest.ini .coveragerc . -g '!node_modules' -g '!dist' -g '!build'

Repository: LabAutomationAndScreening/copier-base-template

Length of output: 24875


🏁 Script executed:

cat -n .config/.coveragerc

Repository: LabAutomationAndScreening/copier-base-template

Length of output: 1151


Use branch coverage terminology here. The repo’s coverage config uses branch coverage, so this guideline should say branch coverage rather than line coverage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 18, Update the filtering-logic guideline in AGENTS.md to
say that compound boolean filters hide individual branches from branch coverage,
replacing the reference to line coverage while preserving the existing loop and
explicit if/continue recommendation.

@ejfine
ejfine merged commit 0e53e05 into main Jul 16, 2026
7 checks passed
@ejfine
ejfine deleted the ruff-bump branch July 16, 2026 16:54
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