Skip to content

Commit

Permalink
Move constants to their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavb committed May 19, 2023
1 parent a564c1e commit 05475cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pypokedex/api.py
Expand Up @@ -5,11 +5,10 @@

import requests

from pypokedex.constants import POKEAPI_BASE_URL
from pypokedex.exceptions import PyPokedexError, PyPokedexHTTPError
from pypokedex.pokemon import Pokemon

POKEAPI_BASE_URL = "https://pokeapi.co/api/v2/pokemon"


@lru_cache(maxsize=None)
def get(**kwargs) -> Pokemon:
Expand Down
2 changes: 2 additions & 0 deletions pypokedex/constants.py
@@ -0,0 +1,2 @@
POKEAPI_BASE_URL = "https://pokeapi.co/api/v2/pokemon"
POKEAPI_SPECIES_URL = "https://pokeapi.co/api/v2/pokemon-species"
3 changes: 1 addition & 2 deletions pypokedex/pokemon.py
Expand Up @@ -5,12 +5,11 @@

import requests

from pypokedex.constants import POKEAPI_SPECIES_URL
from pypokedex.exceptions import PyPokedexError, PyPokedexHTTPError

SpriteKeys = Dict[str, str]

POKEAPI_SPECIES_URL = "https://pokeapi.co/api/v2/pokemon-species"


class Ability(NamedTuple):
name: str
Expand Down

0 comments on commit 05475cd

Please sign in to comment.