Fix linting errors

This commit is contained in:
Christian Garza 2020-07-10 02:59:05 -07:00
parent a14271a67a
commit f44da153fb
3 changed files with 21 additions and 12 deletions

View file

@ -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]),

View file

@ -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),
),
]

View file

@ -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):