sprites.versions all have dashes in their names
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
Research direction
Start by tracing how the sprites.versions generation attributes are exposed in the Python wrapper. Update the generation names to use underscores instead of dashes consistently, then verify that expressions such as generation_iv.front_default can be accessed without a Python syntax error.
Written by the indexing model from the issue text.
Description
If I wanted to get, say, the Gen 4 sprite of Pikachu, my first instinct would be the following:
import pokebase as pb
pikachu = pb.pokemon("pikachu")
pikachu_sprite = pikachu.sprites.versions.generation-iv.front_default
However, notice that generation-iv has a hyphen. According to the python interpreter, that's a subtraction operator, and it throws an error because it doesn't know how to subtract iv.front_default (an object that doesn't exist) from pikachu.sprites.versions.generation (which also doesn't exist).
The simplest fix would probably be to change all generation calls to use underscores instead.
- Dominant language
- Python
- Stars
- 361
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PokeAPI/pokebase
-
Status update Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in PokeAPI/pokebase
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
browser-use/browser-use#5905 ·
-
type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ynput/ayon-python-api#363 ·
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
modelscope/FunASR#3728 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
open-compass/opencompass#2655 ·