Skip to content

Replace flake8/isort with ruff, add uv supply-chain safety#312

Merged
bjester merged 3 commits into
learningequality:release-v0.9.xfrom
rtibblesbot:issue-311-e91a09
Apr 15, 2026
Merged

Replace flake8/isort with ruff, add uv supply-chain safety#312
bjester merged 3 commits into
learningequality:release-v0.9.xfrom
rtibblesbot:issue-311-e91a09

Conversation

@rtibblesbot
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot commented Apr 2, 2026

Summary

Replace flake8/reorder-python-imports with ruff for linting and formatting, add uv exclude-newer for supply chain safety, and add dependabot cooldown. Follows the same approach as learningequality/kolibri#14457 for ecosystem consistency.

The large diff is expected — ruff format touched ~100 files since no formatter was previously configured, and ruff's isort reordered imports differently than the old reorder-python-imports tool. No runtime behavior changes; config files only.

TODO

  • Have tests been written for the new code?
    • N/A — config-only migration, existing tests pass
  • Has documentation been written/updated?
    • N/A — no developer docs reference the old tools
  • New dependencies (if any) added to requirements file
    • N/A — ruff runs via pre-commit, not a project dependency

Reviewer guidance

  • pyproject.toml — verify ruff rule selection (E/W/F/I/T10/T20/C90) maps correctly from the old flake8 config
  • .pre-commit-config.yaml — verify old hooks (flake8, debug-statements, reorder-python-imports) are fully removed and ruff + uv-lock hooks are added
  • Python source changes are entirely auto-generated by ruff format and ruff check --fix — no manual edits

Issues addressed

Closes #311

AI usage

Implementation and PR by Claude Code. Verified via pre-commit hooks passing on all files and full test suite passing.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks

@rtibblesbot rtibblesbot marked this pull request as ready for review April 2, 2026 07:29
Comment thread pyproject.toml Outdated
rtibblesbot and others added 3 commits April 6, 2026 18:04
Replace flake8, reorder-python-imports, and debug-statements pre-commit
hooks with ruff for unified linting, formatting, and import sorting.
Migrate configuration from [tool.flake8] and [tool.isort] to [tool.ruff]
in pyproject.toml (line-length 100, E501 ignored). Apply all ruff
auto-fixes: import reordering, unused import removal, and formatting
normalization across the codebase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pin uv dependency resolution to a 7-day lookback window to avoid
pulling in newly published packages that may be compromised.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Throttle dependabot PRs to reduce noise from frequent minor version
bumps across all package ecosystems.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@bjester bjester left a comment

Choose a reason for hiding this comment

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

This looks acceptable to me

@bjester bjester merged commit 53f3205 into learningequality:release-v0.9.x Apr 15, 2026
26 checks passed
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.

Tooling updates with supply chain delays

2 participants