Repository navigation
fix(settings): 保留解释器覆盖路径和「显示类型错误」四选一,按 Pyrefly 1.4.1 翻译 - #14
Merged
Merged
Conversation
- 恢复 pythonExecutable(Python 解释器覆盖路径):构建任务、运行和 pytest 用它,Pyrefly 和调试仍用工具链解析出的解释器;语言页在解释器下加说明行,构建工具页的查找顺序前加覆盖路径卡片。 - 恢复 displayTypeErrors 四选一,去掉 disableTypeErrors 开关。Pyrefly 1.4.1 弃用 displayTypeErrors 且新设置优先,后端改为发送等价的 typeCheckingMode 与 disableTypeErrors:仅已配置项目 → off,仅报告缺失导入 → basic(Pyrefly 已无此模式),关闭 → disableTypeErrors。 - 预览的类型检查模式卡片按四档画实际效果。 - 恢复当前文件运行的覆盖路径端到端用例,0.8.9 兼容子集一并运行。 - README、功能矩阵、发布说明和截图同步。
xiaoyumuxi
marked this pull request as ready for review
November 23, 2026 04:46
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.
关联 Issue / Linked issue
PR 类型 / Type
改动说明 / What changes
背景 / Why
displayTypeErrors,插件同时发送的typeCheckingMode优先,所以 1.0.0 的四档里只有“关闭”生效。feat(settings): Python 设置页显示当前解释器、补上隐藏类型错误,发布 1.1.0 #13 为此改成了开关,但四档本身是有用的选择,应该让它们按标题生效,而不是删掉。改动 / Changes
pythonExecutable(标题、说明、中文、buildSystems里排在工具链前的{kind: setting}可执行文件、build_provider.py和run_entrypoint.py的覆盖分支)。行为和 1.0.0 一样:构建任务、当前文件运行、手动运行和 pytest 用它;Pyrefly 和调试仍用工具链解析出的解释器。disableTypeErrors开关。新增backend/src/type_errors.rs,pyrefly.resolveLaunch的答复按选择发送 Pyrefly 认的一对设置:始终开启 → 所选预设;仅已配置项目 →typeCheckingMode: "off"(预设只作用于没有 Pyrefly 配置的文件,所以有配置的文件照常);仅报告缺失导入 →"basic"(Pyrefly 0.64 起没有这个模式,基础预设报告无法解析的导入和少数确定的错误);关闭 →disableTypeErrors: true。答复不再发送已弃用的displayTypeErrors。清单里的声明式workspaceConfiguration模板仍发原值,是旧宿主的退路。scripts/test.mjs核对预览草稿里的覆盖说明、构建工具页顺序和启动答复只发新的一对设置;恢复RunCurrentFileInterpreterOverride端到端用例,和RunCurrentFilePinnedInterpreter并存,CI 的 0.8.9 正则同步。docs/releases/v1.1.0.md改为“四档现在都按标题生效”,去掉删除覆盖路径和不迁移的说明,补充 macOS 自带 3.9 不能调试时该选什么;截图重拍。不在本 PR 范围内 / Out of scope
workspaceConfiguration,会覆盖后端启动答复里的配置(Pyrefly 的解释器路径和上面的四档翻译)。已建 [Bug] 立即生效的插件设置改动用清单模板覆盖了后端启动答复里的语言服务器配置(Python 的 pythonPath 会丢) 1lck/Lithe-IDEA#2319,修复在 Draft fix(desktop): 立即生效的设置改动重新向后端询问启动答复里的语言服务器配置 1lck/Lithe-IDEA#2320,Core 文档补充在 Draft docs(plugins): 写明后端决定启动方式的语言服务器在立即生效的设置变化时重新调用启动函数取配置 Lithe-core-rust#176。修好前改完设置重新加载项目即可恢复。feat/python-1.2.0-environments,等本 PR 合入后再开 PR(不叠放)。创建环境不在 1.2.0 里:设置动作没有窗口上下文,不能启动运行。截图 / Screenshots
固定宿主
60885168的 Viva 无头设置窗口,用本分支打出的darwin-arm64插件包。设置项里恢复了「Python 解释器覆盖路径」和「显示类型错误」。语言设置页(中文、深色)
语言设置页(英文、浅色、有未保存草稿)
构建工具页(中文、深色,查找顺序前的覆盖路径卡片)
类型专属:fix
displayTypeErrors的问题删掉了四选一,同时为了“只用一个解释器”删掉了覆盖路径;两者都是用户在用的选择。type_errors.rs的单元测试、scripts/test.mjs的启动答复断言、RunCurrentFileInterpreterOverride端到端用例(含 0.8.9)。范围检查 / Scope checks
scripts/test.mjs与 Rust 测试核对文字和位置。l10n/zh-Hans.json,预览文字在words.rs,中英文都有。ui: 0已有的banner和画布节点,不升能力版本。验证 / Verification
cargo fmt --check、严格 Clippy、cargo test --locked(backend/)node scripts/package.mjs --platform darwin-arm64、node --test --test-timeout=60000 scripts/package/*.test.mjs、node scripts/test.mjsnode scripts/e2e-host.mjs(固定宿主60885168,GOFLAGS=-tags=vivahead)--ref 4d1b88f0…,与 CI 同一正则)typeCheckingMode: "basic"下bad: str = magic_number()不报bad-assignment,和“仅报告缺失导入”的说明一致。本地 e2e 的 PATH
python3需要 3.10 以上并支持venv --copies,PYTEST_PYTHON用 3.12。没有在 Windows、Linux 或原生窗口上验证。