Skip to content

Replace isort with ruff for import sorting#239

Merged
norkans7 merged 1 commit intomainfrom
replace-isort-with-ruff
Apr 6, 2026
Merged

Replace isort with ruff for import sorting#239
norkans7 merged 1 commit intomainfrom
replace-isort-with-ruff

Conversation

@norkans7
Copy link
Copy Markdown
Contributor

@norkans7 norkans7 commented Apr 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 6, 2026 08:42
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.32%. Comparing base (2b23c7e) to head (800bf2a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #239   +/-   ##
=======================================
  Coverage   93.32%   93.32%           
=======================================
  Files          29       29           
  Lines        1843     1843           
=======================================
  Hits         1720     1720           
  Misses        123      123           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes isort and switches import sorting to Ruff’s built-in isort rules.

Changes:

  • Remove isort from the dev optional dependency set and from uv.lock.
  • Enable Ruff’s import-sorting rules (I) and migrate isort configuration into [tool.ruff.lint.isort].
  • Update code_check.py to stop running isort as a separate step.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
uv.lock Removes isort from the resolved dev environment and updates the pinned Ruff version.
pyproject.toml Drops isort from dev extras and configures Ruff to handle import sorting (including Django sectioning).
code_check.py Removes the explicit isort invocation so Ruff is the single import-sorting mechanism.
Comments suppressed due to low confidence (1)

pyproject.toml:41

  • uv.lock pins ruff to 0.15.9, but the dev extra still allows ruff >= 0.15.7. Since this PR adds ruff-isort configuration (custom section-order/sections), using an older allowed ruff version may fail to parse the config or behave differently for contributors installing via pip -e .[dev]. Consider bumping the minimum dev requirement to ruff >= 0.15.9 (or whatever minimum version is required for this config).
[project.optional-dependencies]
dev = [
    "colorama >= 0.4.3",
    "coverage[toml] >= 7.2.2",
    "ruff >= 0.15.7",
    "djlint >= 1.34.1",
]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@norkans7 norkans7 merged commit 6b84eea into main Apr 6, 2026
12 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.

3 participants