"is_default" is not unique per species
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
调研方向
先从 PokemonForm 文档和 issue 中引用的 pokemon.csv 数据开始,然后追踪 API 如何公开 is_default 和 form_order。在确定替换规则之前,先查看现有注释。只有在主要形态的行为达成一致、完成实现并记录文档,且没有让当前字段的语义含糊不清时,才算完成。
由索引模型根据 Issue 内容生成。
描述
The PokemonForm documentation describes is_default as
True for exactly one form used as the default for each Pokémon.
Of the 249 Pokémon with more than one form in pokemon.csv, 222 of them have more than one form with is_default set to True.
While the easiest fix would just be to purge these secondary is_default forms, I think that field should just be deprecated and replaced with a different method of determining the primary form. I have to imagine this field is not widely used by API consumers, as it would not work for its documented purpose.
My preferred design would be to simply have the form of the species with the first form ID be the primary form. It looks like there isn't strictly a form_id field, but it roughly corresponds to the form_order field. So my suggestion would be to just define that the form of the Pokémon with the smallest value in form_order is considered the default form.
- 主要语言
- Python
- 星标
- 5.4k
- 派生
- 1.2k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 13
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PokeAPI/pokeapi 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
PokeAPI/pokeapi#1685 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-2 天 新手友好度 76/100
PokeAPI/pokeapi#1631 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 50/100
PokeAPI/pokeapi#1700 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 50/100
PokeAPI/pokeapi#1697 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
PokeAPI/pokeapi#1694 · 2 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
SwiftKickMobile/skai#84 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
jxxghp/MoviePilot#7070 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
flop-labs/technocore-chat#997 ·
维护者通常 1 天内回复
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoop未关闭
难度 2/5 1-3 小时 新手友好度 76/100
doronz88/pymobiledevice3#2051 ·
维护者通常 1 天内回复