Loading
fix(ci): check imports with the same isort as pre-commit
flowchart LR
DEV["developer commit"] -- "pre-commit: isort 6.0.1<br/>keeps exploded imports (trailing comma)" --> CODE["src/"]
CODE -- "CI validate-mr: isort 5.13.2 from requirements.txt<br/>wants them joined" --> RED["red on 9 files"]
FIX["this MR: requirements.txt isort==6.0.1"] -.-> CI2["CI and pre-commit run the same isort"]CI's validate-mr failed at isort on every MR into this branch, e.g. !201 (merged). The hook and CI ran different isort versions, and they disagree about imports that end in a trailing comma. Pinning 6.0.1, the version in .pre-commit-config.yaml, makes them agree. One file, kubernetes/client.py, had a misplaced requests import and gets a two-line move.
validate-mr step, run in python:3.12-slim |
before | this MR | this MR + !201 (merged) |
|---|---|---|---|
| isort | 10 files | clean | clean |
| black | clean | clean | clean |
| flake8 | clean | clean | clean |
| pytest common edgecloud / network | 3 / 3 passed | 3 / 3 passed | 3 / 3 passed |
| pytest contract/ | 51 passed | 51 passed | 60 passed |
black has the same kind of drift (24.8.0 in requirements.txt, 25.1.0 in pre-commit) but passes today, so it stays out of this MR.
After this merges, rebase !201 (merged) so its pipeline runs on top of it.