mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-22 11:23:13 +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(
|
"front_female": file_path_or_none(
|
||||||
poke_sprites.format("female/" + file_name_png)
|
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(
|
"front_shiny_female": file_path_or_none(
|
||||||
poke_sprites.format("shiny/female/" + file_name_png)
|
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(
|
"back_female": file_path_or_none(
|
||||||
poke_sprites.format("back/female/" + file_name_png)
|
poke_sprites.format("back/female/" + file_name_png)
|
||||||
),
|
),
|
||||||
|
@ -1372,10 +1376,16 @@ def _build_pokemons():
|
||||||
),
|
),
|
||||||
"other": {
|
"other": {
|
||||||
"dream_world": {
|
"dream_world": {
|
||||||
"front_default": file_path_or_none(poke_sprites.format(dream_world.format(file_name_svg))),
|
"front_default": file_path_or_none(
|
||||||
"front_female": file_path_or_none(poke_sprites.format(dream_world.format("female/" + file_name_svg)))
|
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(
|
yield PokemonSprites(
|
||||||
id=int(info[0]),
|
id=int(info[0]),
|
||||||
|
|
|
@ -4,13 +4,13 @@ from django.db import migrations, models
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('pokemon_v2', '0004_iso639length_20191217'),
|
("pokemon_v2", "0004_iso639length_20191217"),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='pokemonsprites',
|
model_name="pokemonsprites",
|
||||||
name='sprites',
|
name="sprites",
|
||||||
field=models.CharField(max_length=20000),
|
field=models.CharField(max_length=20000),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -2744,9 +2744,8 @@ class PokemonDetailSerializer(serializers.ModelSerializer):
|
||||||
replace_sprite_url(value)
|
replace_sprite_url(value)
|
||||||
else:
|
else:
|
||||||
if d[key]:
|
if d[key]:
|
||||||
d[key] = (
|
d[key] = "https://" + host + d[key].replace("/media/", "")
|
||||||
"https://" + host + d[key].replace("/media/", "")
|
|
||||||
)
|
|
||||||
replace_sprite_url(sprites_data)
|
replace_sprite_url(sprites_data)
|
||||||
|
|
||||||
return sprites_data
|
return sprites_data
|
||||||
|
|
Loading…
Reference in a new issue