()
| 287 | |
| 288 | |
| 289 | def _build_stats(): |
| 290 | def csv_record_to_objects(info): |
| 291 | yield Stat( |
| 292 | id=int(info[0]), |
| 293 | move_damage_class_id=int(info[1]) if info[1] != "" else None, |
| 294 | name=info[2], |
| 295 | is_battle_only=bool(int(info[3])), |
| 296 | game_index=int(info[4]) if info[4] else 0, |
| 297 | ) |
| 298 | |
| 299 | build_generic((Stat,), "stats.csv", csv_record_to_objects) |
| 300 | |
| 301 | def csv_record_to_objects(info): |
| 302 | yield StatName(stat_id=int(info[0]), language_id=int(info[1]), name=info[2]) |
| 303 | |
| 304 | build_generic((StatName,), "stat_names.csv", csv_record_to_objects) |
| 305 | |
| 306 | def csv_record_to_objects(info): |
| 307 | yield PokeathlonStat(id=int(info[0]), name=info[1]) |
| 308 | |
| 309 | build_generic((PokeathlonStat,), "pokeathlon_stats.csv", csv_record_to_objects) |
| 310 | |
| 311 | def csv_record_to_objects(info): |
| 312 | yield PokeathlonStatName( |
| 313 | pokeathlon_stat_id=int(info[0]), language_id=int(info[1]), name=info[2] |
| 314 | ) |
| 315 | |
| 316 | build_generic( |
| 317 | (PokeathlonStatName,), "pokeathlon_stat_names.csv", csv_record_to_objects |
| 318 | ) |
| 319 | |
| 320 | |
| 321 | # ############### |
no test coverage detected