Skip to content

chore: sort imports with ruff - #216

Merged
petercorke merged 4 commits into
mainfrom
chore/sort-imports
Nov 22, 2026
Merged

petercorke merged 4 commits into
mainfrom
chore/sort-imports

Conversation

@petercorke

@petercorke petercorke commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Applies ruff's import sorting (rule I001, already enabled in pyproject.toml) to src and tests: ruff check --select I001 --fix src tests. 46 findings in 34 files, all of them the order and grouping of import lines (standard library, third party, then machinevisiontoolbox). No code changes. Notebooks are not touched, since a separate pre-commit hook manages them.

Ruff is not run in CI or pre-commit, which is why these had built up. Refs #41 (Codacy backlog).

Testing

ruff check --select I001 src tests: no findings. mypy: no issues. pytest tests: 1541 passed, 33 skipped. The package imports and the test suite still pass, so no import-order dependence turned up. Not run: CI on Windows or OpenCV 4 (CI will).

This change was written with AI assistance (Claude Code) and the diff has been read by the maintainer.

🤖 Generated with Claude Code

Applies ruff's import sorting (rule I001, which pyproject.toml already
enables) to src and tests. Only the order and grouping of import lines
change, in 34 files. Notebooks are left alone, since a separate hook
manages them.

Refs #41

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit 12d9187 into main Nov 22, 2026
32 checks passed
@petercorke
petercorke deleted the chore/sort-imports branch November 22, 2026 05:34
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.

1 participant