MPT-22108 fix phase-step ruff:ignore suppression (broken main build) - #59
Conversation
Ruff 0.15.22 (now pinned on main) enforces the `noqa-comments` rule: suppressing a ruff code with `# noqa:` is rejected in favour of `# ruff:ignore[...]`. The `# noqa: PLC2701` on the `_normalize_phases` import that merged in #53 therefore breaks the post-merge build on main (job `packages (phase-step)`). Switch the suppression to `# ruff:ignore[import-private-name]`, which ruff accepts, keeping the same-package internal import unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📜 Recent review details⏰ Context from checks skipped due to timeout. (2)
🧰 Additional context used📓 Path-based instructions (2)**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📚 Learning: 2026-07-03T13:40:50.305ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughChangesLint suppression
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
Comment |
|



🤖 AI-generated PR — Please review carefully.
What
Fixes the broken
PR build and mergeonmainafter #53. Thepackages (phase-step)job fails because ruff 0.15.22 (now pinned onmain) enforces thenoqa-commentsrule: a ruff code must be suppressed with# ruff:ignore[...], not# noqa:.One-line change on the
_normalize_phasesimport inphase_gate.py:_normalize_phases, # noqa: PLC2701 # same-package internal helper_normalize_phases, # ruff:ignore[import-private-name] # same-package internal helperWhy it happened
#53 was validated against ruff 0.15.21, which did not enforce this rule.
mainhas since bumped ruff to 0.15.22, so the merged suppression started failing post-merge.Testing
Reproduced the failure locally (ruff 0.15.22 = main's pin), then ran the same flow as the failing
packages (phase-step)job:scripts/check_repository.py,ruff format --check,ruff check,flake8,mypy,uv lock --check— all passpytest phase-step— 25 passed, 100% coverageFixes the failure in https://github.com/softwareone-platform/mpt-extension-python-contrib/actions/runs/29755869740
_normalize_phasesimport to support Ruff 0.15.22.