bug in typecasting
This commit is contained in:
parent
ffc463a5e3
commit
3854a9b03c
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ async def get_json(self, url):
|
||||||
class Pokemon:
|
class Pokemon:
|
||||||
async def __init__(self, id: int, generate: bool = True) -> None:
|
async def __init__(self, id: int, generate: bool = True) -> None:
|
||||||
if generate: # Should I even do it this way?
|
if generate: # Should I even do it this way?
|
||||||
self.json_data = await self.get_pkmn_from_id(id: int)
|
self.json_data = await self.get_pkmn_from_id(id)
|
||||||
|
|
||||||
async def get_pkmn_from_id(id):
|
async def get_pkmn_from_id(id):
|
||||||
url = 'https://pokeapi.co/api/v2/pokemon/' + str(id)
|
url = 'https://pokeapi.co/api/v2/pokemon/' + str(id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue