MCPcopy
hub / github.com/PokeAPI/pokeapi / _build_generations

Function _build_generations

data/v2/build.py:206–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

204
205
206def _build_generations():
207 def csv_record_to_objects(info):
208 yield Generation(id=int(info[0]), region_id=int(info[1]), name=info[2])
209
210 build_generic((Generation,), "generations.csv", csv_record_to_objects)
211
212 def csv_record_to_objects(info):
213 yield GenerationName(
214 generation_id=int(info[0]), language_id=int(info[1]), name=info[2]
215 )
216
217 build_generic((GenerationName,), "generation_names.csv", csv_record_to_objects)
218
219
220#############

Callers 1

build_allFunction · 0.85

Calls 1

build_genericFunction · 0.85

Tested by

no test coverage detected