Skip to content

chore: fix findings of ruff 0.17 - #55

Merged
matejpekar merged 1 commit into
mainfrom
claude/ruff-cleanup
Oct 13, 2026
Merged

matejpekar merged 1 commit into
mainfrom
claude/ruff-cleanup

Conversation

@vejtek

@vejtek vejtek commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

The lint workflow (RationAI/.github → python-lint.yml) runs uvx ruff without a version, so it always gets the latest ruff. Since main last passed in July, ruff added rules, and now every new PR fails the Ruff job on code it doesn't touch (e.g. #54). This PR makes main pass with ruff 0.17.0 again.

Changes (no behaviour change)

  • RUF036: None moved to the end of type unions in model_selection/split.py and torch/data/openslide_tile_reader.py.
  • BLE001: the two broad except Exception in MemMap.close() stay. It's best-effort cleanup that also runs from __del__, so they are now marked with noqa and a reason.
  • ruff format: ruff 0.17 also formats Python code blocks in Markdown, which is why some docs pages changed. Only code blocks in them changed.

Checks (local)

  • ruff check and ruff format --check with 0.17.0: clean.
  • mypy .: clean.
  • pytest: 373 passed.
  • mkdocs build --strict: passes.

A separate PR in RationAI/.github will pin the ruff version in the shared workflow, so a ruff release no longer breaks every repo at once. Please merge this one before #54.

🤖 Generated with Claude Code

Lint CI runs the latest ruff, which added rules since main last passed,
so every new PR failed on code it did not touch.

- RUF036: move None to the end of type unions (split, openslide_tile_reader)
- BLE001: keep the broad except in MemMap.close() (best-effort cleanup that
  also runs from __del__) and mark it with noqa
- ruff format, including the code blocks in the Markdown docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vejtek
vejtek requested review from a team, Adames4 and matejpekar October 13, 2026 15:09
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9fc7b24c-4231-47c3-9638-7c20050fde07
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation Preview

Preview URL: https://RationAI.github.io/ratiopath/claude-ruff-cleanup/

@matejpekar
matejpekar merged commit 27929a7 into main Oct 13, 2026
7 checks passed
@matejpekar
matejpekar deleted the claude/ruff-cleanup branch October 13, 2026 21:05
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.

3 participants