mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-10 06:04:18 +00:00
Fix linting errors
This commit is contained in:
parent
a14271a67a
commit
f44da153fb
3 changed files with 21 additions and 12 deletions
|
@ -1356,11 +1356,15 @@ def _build_pokemons():
|
|||
"front_female": file_path_or_none(
|
||||
poke_sprites.format("female/" + file_name_png)
|
||||
),
|
||||
"front_shiny": file_path_or_none(poke_sprites.format("shiny/" + file_name_png)),
|
||||
"front_shiny": file_path_or_none(
|
||||
poke_sprites.format("shiny/" + file_name_png)
|
||||
),
|
||||
"front_shiny_female": file_path_or_none(
|
||||
poke_sprites.format("shiny/female/" + file_name_png)
|
||||
),
|
||||
"back_default": file_path_or_none(poke_sprites.format("back/" + file_name_png)),
|
||||
"back_default": file_path_or_none(
|
||||
poke_sprites.format("back/" + file_name_png)
|
||||
),
|
||||
"back_female": file_path_or_none(
|
||||
poke_sprites.format("back/female/" + file_name_png)
|
||||
),
|
||||
|
@ -1372,10 +1376,16 @@ def _build_pokemons():
|
|||
),
|
||||
"other": {
|
||||
"dream_world": {
|
||||
"front_default": file_path_or_none(poke_sprites.format(dream_world.format(file_name_svg))),
|
||||
"front_female": file_path_or_none(poke_sprites.format(dream_world.format("female/" + file_name_svg)))
|
||||
"front_default": file_path_or_none(
|
||||
poke_sprites.format(dream_world.format(file_name_svg))
|
||||
),
|
||||
"front_female": file_path_or_none(
|
||||
poke_sprites.format(
|
||||
dream_world.format("female/" + file_name_svg)
|
||||
)
|
||||
),
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
yield PokemonSprites(
|
||||
id=int(info[0]),
|
||||
|
|
|
@ -4,13 +4,13 @@ from django.db import migrations, models
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pokemon_v2', '0004_iso639length_20191217'),
|
||||
("pokemon_v2", "0004_iso639length_20191217"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='pokemonsprites',
|
||||
name='sprites',
|
||||
model_name="pokemonsprites",
|
||||
name="sprites",
|
||||
field=models.CharField(max_length=20000),
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2744,11 +2744,10 @@ class PokemonDetailSerializer(serializers.ModelSerializer):
|
|||
replace_sprite_url(value)
|
||||
else:
|
||||
if d[key]:
|
||||
d[key] = (
|
||||
"https://" + host + d[key].replace("/media/", "")
|
||||
)
|
||||
d[key] = "https://" + host + d[key].replace("/media/", "")
|
||||
|
||||
replace_sprite_url(sprites_data)
|
||||
|
||||
|
||||
return sprites_data
|
||||
|
||||
def get_pokemon_moves(self, obj):
|
||||
|
|
Loading…
Reference in a new issue