check-typing: ty 0.0.98+ fails on the renamed rule `unresolved-import` (now `import-not-found`)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 94/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- build-system, ci-cd, testing
调研方向
阅读 justfile:872 中的 check-typing recipe,以及 .github/workflows/main.yml:70 中安装 ty 的步骤。使用 recipe 当前的忽略列表重现警告,然后按照 issue 的描述替换已重命名的规则。使用 ty 0.0.99 运行检查,并确认检查通过且没有关于已重命名规则的诊断。
由索引模型根据 Issue 内容生成。
描述
What happens
ty 0.0.97 renamed the rule unresolved-import to import-not-found (astral-sh/ruff#29960). Since 0.0.98, ty warns when the old name is used (astral-sh/ruff#30024):
warning[renamed-rule]: Rule `unresolved-import` has been renamed to `import-not-found`
check-typing still passes --ignore unresolved-import (justfile:872), and ty exits with 1 on this warning. So the check fails without any real type error. CI installs ty unpinned (uv tool install ty, .github/workflows/main.yml:70), so every PR is red on quality-checks since ty 0.0.98.
Evidence
Run on master with ty 0.0.97, 0.0.98 and 0.0.99 and the recipe's exact --ignore list:
- 0.0.97: passes (no warning);
- 0.0.98 / 0.0.99 as-is:
Found 1 diagnostic, which is therenamed-rulewarning, exit 1; - 0.0.99 with
--ignore import-not-foundinstead:All checks passed!.
All other rule names in the recipe are valid in 0.0.99; this is the only rename in ty 0.0.97 to 0.0.99.
Fix
In justfile:872:
- --ignore unresolved-import \
+ --ignore import-not-found \
No pin needed: CI keeps using the latest ty.
- 主要语言
- Python
- 星标
- 2.5k
- 派生
- 768
- 平均合并
- 3 小时 45 分钟
- 30 天内合并 PR
- 18
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
crossbario/autobahn-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
crossbario/autobahn-python#2042 ·
维护者通常 1 天内回复
-
CI-CD enhancement
难度 2/5 1-3 小时 新手友好度 78/100
crossbario/autobahn-python#1945 · 1 条评论 ·
维护者通常 1 天内回复
-
bug CI-CD
难度 2/5 1-3 小时 新手友好度 76/100
crossbario/autobahn-python#1932 ·
维护者通常 1 天内回复
-
CI-CD enhancement
难度 2/5 1-3 小时 新手友好度 72/100
crossbario/autobahn-python#1829 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
crossbario/autobahn-python#2033 ·
维护者通常 1 天内回复
查看 crossbario/autobahn-python 的全部 Issue
相似的 Issue
-
community enhancement
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
NVIDIA/auto-ontology#463 ·
维护者通常 1 天内回复
-
Update Atari link on Gymnasium docs page可能已有人在做 @qwist1233-cpu 今天认领。 未关闭help wanted
难度 2/5 1-3 小时 新手友好度 66/100
Farama-Foundation/Gymnasium#1845 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 91/100
WingedGuardian/GENesis-AGI#4101 ·
维护者通常 1 天内回复