Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #123 +/- ##
=======================================
Coverage 99.79% 99.79%
=======================================
Files 9 9
Lines 1443 1443
=======================================
Hits 1440 1440
Misses 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s Python tooling to remove isort and rely on Ruff’s import-sorting lint rule (I) for enforcing import order in the temba_client package.
Changes:
- Removes
isortfrom dev dependencies anduv.lock. - Enables Ruff’s import-sorting rule (
I) and adds[tool.ruff.lint.isort]configuration. - Removes the dedicated
isortCI step (import sorting is now checked viaruff check).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
uv.lock |
Drops the locked isort package and removes it from dev dependency metadata. |
pyproject.toml |
Removes [tool.isort], enables Ruff’s I rule, and adds Ruff isort-lint configuration. |
.github/workflows/ci.yml |
Removes the separate isort CI step, relying on Ruff instead. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -28,9 +28,6 @@ jobs: | |||
| - name: Run ruff | |||
| run: uv run ruff check temba_client | |||
There was a problem hiding this comment.
pyproject.toml sets tool.ruff.fix = true, which causes ruff check to run in fix mode by default. In CI this can auto-modify the working tree and still succeed, which may allow lint/import-order issues to slip through without failing the job. Consider running ruff check --no-fix (or adding --exit-non-zero-on-fix) so CI fails when fixes would be applied.
| run: uv run ruff check temba_client | |
| run: uv run ruff check --no-fix temba_client |
| sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] | ||
| [tool.ruff.lint.isort] | ||
| combine-as-imports = true | ||
| known-first-party = ["temba_client"] |
There was a problem hiding this comment.
The prior [tool.isort] config set wrapping/formatting options (e.g., multi_line_output, include_trailing_comma, line_length). The new [tool.ruff.lint.isort] table only sets combine-as-imports and known-first-party, so Ruff will fall back to its defaults for the rest, which can change import formatting/order compared to what was previously enforced. Consider porting the relevant isort options to Ruff equivalents (or running ruff check --fix once and committing any resulting import reformat) to avoid unexpected churn later.
| known-first-party = ["temba_client"] | |
| known-first-party = ["temba_client"] | |
| split-on-trailing-comma = true |
Summary
Irule) instead[tool.ruff.lint.isort]config withcombine-as-importsandknown-first-partyruff check)