--warn-annotation-comments
未关闭
还没有人认领这个 Issue。
feature
needs discussion
priority-2-low
- 主要语言
- Python
- 星标
- 20.6k
- 派生
- 3.3k
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 54
描述
I think having a linter option warning about old-style type comment annotations, instead of PEP 3107/526 annotations, would be useful. (With the obvious exception of # type: ignore comments.) This is potentially something that would make more sense in linters like flake8, but mypy also feels like a natural place where such an option could exist.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定文件、测试或入口点。首先定位 mypy 的命令行选项处理,以及其对类型注释和 PEP 3107/526 注解的处理。完成标准是:为旧式类型注释注解提供可配置的警告,同时排除 # type: ignore,并配有覆盖该警告行为的测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 32/100