fix(ci): 修复 GitHub Actions CI 全部失败项#99
Merged
Merged
Conversation
- canonical.py: noqa: F401 从独立行改为内联模式,Ruff 自动合并同源 import 块 - copilot_urls.py: noqa: F401 注释位置修正为 from 行末尾(与项目一致模式) - copilot_models.py: I001 导入排序自动修复 - auth_commands.py: TokenStoreManager 导入从模块级移入 _build_token_store() 函数内部,修复 patch 拦截失效导致 Antigravity refresh 测试回归 - test_cli_usage.py: help 输出断言增加 ANSI 转义码剥离,修复 Rich 格式化下 --vendor 匹配失败 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
修复 GitHub Actions CI Pipeline 中 全部 16 个错误(Ruff Lint 13 个 + 测试回归 3 个),使 CI 从持续失败恢复为全绿。
问题根因
# noqa: F401独立行注释模式在 Ruff 新版本中不再被识别TokenStoreManager被提升为模块级导入,导致patch()无法拦截,store 返回空 token 使 refresh 条件不满足--vendor,字面量匹配失败修改文件
src/coding/proxy/compat/canonical.py— noqa 内联化 + import 块合并src/coding/proxy/vendors/copilot_urls.py— noqa 注释位置修正src/coding/proxy/vendors/copilot_models.py— I001 导入排序自动修复src/coding/proxy/cli/auth_commands.py— TokenStoreManager 导入移入函数内部(核心修复)tests/test_cli_usage.py— ANSI 码剥离后断言 vendor flag验证
uv run ruff check .— 零错误uv run ruff format --check .— 116 文件无需调整uv run pytest— 920 passed, 0 failed, 覆盖率 85%🤖 Generated with Claude Code, CodeX, Gemini