mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-10 14:14:17 +00:00
Format source code again
This commit is contained in:
parent
c513fa5b56
commit
39856de97b
8 changed files with 557 additions and 182 deletions
|
@ -17,7 +17,9 @@ CACHES = {
|
|||
"default": {
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": "redis://cache:6379/1",
|
||||
"OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient",},
|
||||
"OPTIONS": {
|
||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@ CACHES = {
|
|||
"default": {
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": "redis://127.0.0.1:6379/1",
|
||||
"OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient",},
|
||||
"OPTIONS": {
|
||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,11 @@ DATABASES = {
|
|||
}
|
||||
}
|
||||
|
||||
CACHES = {"default": {"BACKEND": "django.core.cache.backends.dummy.DummyCache",}}
|
||||
CACHES = {
|
||||
"default": {
|
||||
"BACKEND": "django.core.cache.backends.dummy.DummyCache",
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG = True
|
||||
TASTYPIE_FULL_DEBUG = True
|
||||
|
|
|
@ -72,7 +72,9 @@ CACHES = {
|
|||
"default": {
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": "redis://127.0.0.1:6379/1",
|
||||
"OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient",},
|
||||
"OPTIONS": {
|
||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,9 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
),
|
||||
],
|
||||
options={"abstract": False,},
|
||||
options={
|
||||
"abstract": False,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="PokemonFormSprites",
|
||||
|
@ -58,7 +60,9 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
),
|
||||
],
|
||||
options={"abstract": False,},
|
||||
options={
|
||||
"abstract": False,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="PokemonSprites",
|
||||
|
@ -84,6 +88,8 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
),
|
||||
],
|
||||
options={"abstract": False,},
|
||||
options={
|
||||
"abstract": False,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -55,6 +55,8 @@ class Migration(migrations.Migration):
|
|||
),
|
||||
),
|
||||
],
|
||||
options={"abstract": False,},
|
||||
options={
|
||||
"abstract": False,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -17,7 +17,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_gender_data(cls, name="gndr"):
|
||||
|
||||
gender = Gender.objects.create(name=name,)
|
||||
gender = Gender.objects.create(
|
||||
name=name,
|
||||
)
|
||||
gender.save()
|
||||
|
||||
return gender
|
||||
|
@ -27,7 +29,11 @@ class APIData:
|
|||
def setup_language_data(cls, name="lang"):
|
||||
|
||||
language = Language.objects.create(
|
||||
iso639="ts", iso3166="tt", name=name, official=True, order=1,
|
||||
iso639="ts",
|
||||
iso3166="tt",
|
||||
name=name,
|
||||
official=True,
|
||||
order=1,
|
||||
)
|
||||
language.save()
|
||||
|
||||
|
@ -115,7 +121,10 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_version_data(cls, version_group=None, name="ver"):
|
||||
|
||||
version = Version.objects.create(name=name, version_group=version_group,)
|
||||
version = Version.objects.create(
|
||||
name=name,
|
||||
version_group=version_group,
|
||||
)
|
||||
version.save()
|
||||
|
||||
return version
|
||||
|
@ -218,7 +227,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_item_attribute_data(cls, name="itm attr"):
|
||||
|
||||
item_attribute = ItemAttribute.objects.create(name=name,)
|
||||
item_attribute = ItemAttribute.objects.create(
|
||||
name=name,
|
||||
)
|
||||
item_attribute.save()
|
||||
|
||||
return item_attribute
|
||||
|
@ -260,7 +271,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_item_fling_effect_data(cls, name="itm flng efct"):
|
||||
|
||||
item_fling_effect = ItemFlingEffect.objects.create(name=name,)
|
||||
item_fling_effect = ItemFlingEffect.objects.create(
|
||||
name=name,
|
||||
)
|
||||
item_fling_effect.save()
|
||||
|
||||
return item_fling_effect
|
||||
|
@ -282,7 +295,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_item_pocket_data(cls, name="itm pkt"):
|
||||
|
||||
item_pocket = ItemPocket.objects.create(name=name,)
|
||||
item_pocket = ItemPocket.objects.create(
|
||||
name=name,
|
||||
)
|
||||
item_pocket.save()
|
||||
|
||||
return item_pocket
|
||||
|
@ -417,7 +432,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_contest_type_data(cls, name="cntst tp"):
|
||||
|
||||
contest_type = ContestType.objects.create(name=name,)
|
||||
contest_type = ContestType.objects.create(
|
||||
name=name,
|
||||
)
|
||||
contest_type.save()
|
||||
|
||||
return contest_type
|
||||
|
@ -473,7 +490,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_super_contest_effect_data(cls, appeal=2):
|
||||
|
||||
super_contest_effect = SuperContestEffect.objects.create(appeal=appeal,)
|
||||
super_contest_effect = SuperContestEffect.objects.create(
|
||||
appeal=appeal,
|
||||
)
|
||||
super_contest_effect.save()
|
||||
|
||||
return super_contest_effect
|
||||
|
@ -522,7 +541,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_berry_firmness_data(cls, name="bry frmns"):
|
||||
|
||||
berry_firmness = BerryFirmness.objects.create(name=name,)
|
||||
berry_firmness = BerryFirmness.objects.create(
|
||||
name=name,
|
||||
)
|
||||
berry_firmness.save()
|
||||
|
||||
return berry_firmness
|
||||
|
@ -590,7 +611,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_egg_group_data(cls, name="egg grp"):
|
||||
|
||||
egg_group = EggGroup.objects.create(name=name,)
|
||||
egg_group = EggGroup.objects.create(
|
||||
name=name,
|
||||
)
|
||||
egg_group.save()
|
||||
|
||||
return egg_group
|
||||
|
@ -1271,7 +1294,9 @@ class APIData:
|
|||
):
|
||||
|
||||
nature_pokeathlon_stat = NaturePokeathlonStat.objects.create(
|
||||
nature=nature, pokeathlon_stat=pokeathlon_stat, max_change=max_change,
|
||||
nature=nature,
|
||||
pokeathlon_stat=pokeathlon_stat,
|
||||
max_change=max_change,
|
||||
)
|
||||
nature_pokeathlon_stat.save()
|
||||
|
||||
|
@ -1302,7 +1327,10 @@ class APIData:
|
|||
|
||||
region = region or cls.setup_region_data(name="rgn for " + name)
|
||||
|
||||
pokedex = Pokedex.objects.create(name=name, region=region,)
|
||||
pokedex = Pokedex.objects.create(
|
||||
name=name,
|
||||
region=region,
|
||||
)
|
||||
pokedex.save()
|
||||
|
||||
return pokedex
|
||||
|
@ -1349,7 +1377,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_pokemon_habitat_data(cls, name="pkm hbtt"):
|
||||
|
||||
pokemon_habitat = PokemonHabitat.objects.create(name=name,)
|
||||
pokemon_habitat = PokemonHabitat.objects.create(
|
||||
name=name,
|
||||
)
|
||||
pokemon_habitat.save()
|
||||
|
||||
return pokemon_habitat
|
||||
|
@ -1369,7 +1399,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_pokemon_color_data(cls, name="pkm clr"):
|
||||
|
||||
pokemon_color = PokemonColor.objects.create(name=name,)
|
||||
pokemon_color = PokemonColor.objects.create(
|
||||
name=name,
|
||||
)
|
||||
pokemon_color.save()
|
||||
|
||||
return pokemon_color
|
||||
|
@ -1389,7 +1421,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_pokemon_shape_data(cls, name="pkm shp"):
|
||||
|
||||
pokemon_shape = PokemonShape.objects.create(name=name,)
|
||||
pokemon_shape = PokemonShape.objects.create(
|
||||
name=name,
|
||||
)
|
||||
pokemon_shape.save()
|
||||
|
||||
return pokemon_shape
|
||||
|
@ -1765,7 +1799,9 @@ class APIData:
|
|||
@classmethod
|
||||
def setup_evolution_trigger_data(cls, name="evltn trgr"):
|
||||
|
||||
evolution_trigger = EvolutionTrigger.objects.create(name=name,)
|
||||
evolution_trigger = EvolutionTrigger.objects.create(
|
||||
name=name,
|
||||
)
|
||||
evolution_trigger.save()
|
||||
|
||||
return evolution_trigger
|
||||
|
@ -3324,8 +3360,10 @@ class APITests(APIData, APITestCase):
|
|||
def test_super_contest_effect_api(self):
|
||||
|
||||
super_contest_effect = self.setup_super_contest_effect_data(appeal=10)
|
||||
super_contest_effect_flavor_text = self.setup_super_contest_effect_flavor_text_data(
|
||||
super_contest_effect, flavor_text="base spr cntst efct flvr txt"
|
||||
super_contest_effect_flavor_text = (
|
||||
self.setup_super_contest_effect_flavor_text_data(
|
||||
super_contest_effect, flavor_text="base spr cntst efct flvr txt"
|
||||
)
|
||||
)
|
||||
move = self.setup_move_data(
|
||||
name="mv for base spr cntst efct", super_contest_effect=super_contest_effect
|
||||
|
@ -4541,8 +4579,10 @@ class APITests(APIData, APITestCase):
|
|||
pokemon_species_name = self.setup_pokemon_species_name_data(
|
||||
pokemon_species, name="base pkmn shp name"
|
||||
)
|
||||
pokemon_species_form_description = self.setup_pokemon_species_form_description_data(
|
||||
pokemon_species, description="frm dscr for pkmn spcs"
|
||||
pokemon_species_form_description = (
|
||||
self.setup_pokemon_species_form_description_data(
|
||||
pokemon_species, description="frm dscr for pkmn spcs"
|
||||
)
|
||||
)
|
||||
pokemon_species_flavor_text = self.setup_pokemon_species_flavor_text_data(
|
||||
pokemon_species, flavor_text="flvr txt for pkmn spcs"
|
||||
|
@ -5261,11 +5301,14 @@ class APITests(APIData, APITestCase):
|
|||
evolution_chain = self.setup_evolution_chain_data()
|
||||
|
||||
basic = self.setup_pokemon_species_data(
|
||||
name="wurmple", evolution_chain=evolution_chain,
|
||||
name="wurmple",
|
||||
evolution_chain=evolution_chain,
|
||||
)
|
||||
|
||||
stage_one_first = self.setup_pokemon_species_data(
|
||||
name="silcoon", evolves_from_species=basic, evolution_chain=evolution_chain,
|
||||
name="silcoon",
|
||||
evolves_from_species=basic,
|
||||
evolution_chain=evolution_chain,
|
||||
)
|
||||
stage_one_first_evolution = self.setup_pokemon_evolution_data(
|
||||
evolved_species=stage_one_first, min_level=7
|
||||
|
@ -5281,7 +5324,9 @@ class APITests(APIData, APITestCase):
|
|||
)
|
||||
|
||||
stage_one_second = self.setup_pokemon_species_data(
|
||||
name="cascoon", evolves_from_species=basic, evolution_chain=evolution_chain,
|
||||
name="cascoon",
|
||||
evolves_from_species=basic,
|
||||
evolution_chain=evolution_chain,
|
||||
)
|
||||
stage_one_second_evolution = self.setup_pokemon_evolution_data(
|
||||
evolved_species=stage_one_second, min_level=7
|
||||
|
|
Loading…
Reference in a new issue