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

Function _build_languages

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

Source from the content-addressed store, hash-verified

161
162
163def _build_languages():
164 def csv_record_to_objects(info):
165 yield Language(
166 id=int(info[0]),
167 iso639=info[1],
168 iso3166=info[2],
169 name=info[3],
170 official=bool(int(info[4])),
171 order=info[5],
172 )
173
174 build_generic((Language,), "languages.csv", csv_record_to_objects)
175
176 def csv_record_to_objects(info):
177 yield LanguageName(
178 language_id=int(info[0]), local_language_id=int(info[1]), name=info[2]
179 )
180
181 build_generic((LanguageName,), "language_names.csv", csv_record_to_objects)
182
183
184############

Callers 1

build_allFunction · 0.85

Calls 1

build_genericFunction · 0.85

Tested by

no test coverage detected