Repository navigation
ci: lint Python with flake8 defaults and fit the drift check to them - #400
Conversation
Downstream mirrors lint every Python file with flake8 defaults (79-column lines), and check-aisix-config-drift.py had ten longer lines. Rewrap them (formatting only; the parsed AST is unchanged) and add a Python lint job plus a pre-commit hook that run flake8 7.3.0 with --isolated over every tracked *.py file, so a new script is held to the same defaults.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe pull request adds a pinned flake8 hook and a CI lint job. It also reformats the AI Six configuration drift-check script without changing its behavior. ChangesPython lint checks
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The new lint check passes on the tracked Python file, and no actionable write-permission risk was established. No merge-blocking issue remains. 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Downstream mirrors of this repo lint Python with flake8 defaults (79-character lines, every default check), and
.github/scripts/check-aisix-config-drift.pyhad ten lines past 79 columns, so it fails those gates.This rewraps those lines. It's formatting only: long strings are split into adjacent literals and long expressions are wrapped in parentheses, so the parsed AST is identical to before and the script prints exactly the same messages.
To keep it that way, CI gets a
Python lintjob that installs flake8 7.3.0 and runsflake8 --isolatedover every tracked*.pyfile (found withgit ls-files, so a new script is covered without editing the workflow).--isolatedignores config files, so nobody can loosen the defaults by adding a.flake8orsetup.cfg..pre-commit-config.yamlgets the matching flake8 hook with the same--isolatedarg, so local commits catch it too.🤖 Generated with Claude Code
Summary by CodeRabbit