修复构建脚本 & 新增连接类型检测#4
Merged
Merged
Conversation
- clean.sh: 移除 find 命令中误用的 -prune,确保 __pycache__ 能被正确删除 - build.sh: 为 Nuitka 添加 --company-name / --product-name / --file-version 元数据参数,避免仅依赖 pyproject.toml 的 [tool.nuitka] 配置 - 两者均使用 set -euo pipefail 替代 set -e,提升健壮性
新增 4 个测试验证: - --reflect x 与 -y 同时使用时,--reflect 优先 - --reflect xy 与 -x 同时使用时,--reflect 优先,记录警告 - --reflect y 与 -x 同时使用时,--reflect 优先,记录警告 - --reflect normal(清除)后 -x 仍生效
- winrandr/win32/constants.py:新增 targetFlags 连接类型位常量和映射表 - winrandr/win32/utils.py:新增 get_connector_type(path) 解析函数 - winrandr/api.py:get_display_props() 输出 ConnectorType - 重构 get_display_props 提取 _get_config_props 以降低循环复杂度 - tests/unit/win32/test_connector_type.py:7 项单元测试覆盖所有连接类型 - tests/integration/test_api.py:集成测试验证 connector_type 字段
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.
变更内容
1. 修复构建脚本
2. 新增连接类型检测
新增 DISPLAYCONFIG_TARGET_DEVICE_NAME.targetFlags 连接类型解析,在 --prop 输出中展示 ConnectorType
Test plan