MattIPv4 / MattIPv4/PyDMXControl
TypeError in web/_routes.py
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 143
- 派生
- 23
- PR 合并指标
- 30 天内没有已合并 PR
描述
web/_routes.py contains Colors.to_hex(this_fixture.get_color()) a few times, and there's no type known for this_fixture (in pyright, at least).
If that type were annotated, you'd get an early warning that get_color() can return None, but to_hex can't take None.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 web/_routes.py 开始,读取 Colors.to_hex(this_fixture.get_color()) 的出现位置,并追踪 this_fixture 的类型以及 get_color() 可能的返回值。在受影响的代码上运行 pyright;当 fixture 的类型已知,并且通过静态检查识别出可能传递给 to_hex 的 None 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100