Skip to content

sprites.versions all have dashes in their names #44

Open
@axiopaladin

Description

@axiopaladin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions