From a48b2a7953bfb4a53fda81ce3c56ae4f9106b557 Mon Sep 17 00:00:00 2001 From: Xuanyi WANG Date: Fri, 8 Sep 2023 23:25:56 +0100 Subject: [PATCH] `save_int` for all integer string from Ergast --- fastf1/ergast/structure.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fastf1/ergast/structure.py b/fastf1/ergast/structure.py index e26fdfbc4..ee187ecd6 100644 --- a/fastf1/ergast/structure.py +++ b/fastf1/ergast/structure.py @@ -506,7 +506,7 @@ def _merge_dicts_of_lists(data): 'name': 'Seasons', 'type': list, 'method': _flatten_by_rename, - 'map': {'season': {'name': 'season', 'type': int}, + 'map': {'season': {'name': 'season', 'type': save_int}, 'url': {'name': 'seasonUrl', 'type': str}}, 'sub': [], 'finalize': None @@ -516,8 +516,8 @@ def _merge_dicts_of_lists(data): 'name': 'StandingsLists', 'type': list, 'method': _flatten_by_rename, - 'map': {'season': {'name': 'season', 'type': int}, - 'round': {'name': 'round', 'type': int}}, + 'map': {'season': {'name': 'season', 'type': save_int}, + 'round': {'name': 'round', 'type': save_int}}, 'finalize': None } @@ -536,8 +536,8 @@ def _merge_dicts_of_lists(data): 'name': 'Races', 'type': list, 'method': _flatten_by_rename, - 'map': {'season': {'name': 'season', 'type': int}, - 'round': {'name': 'round', 'type': int}, + 'map': {'season': {'name': 'season', 'type': save_int}, + 'round': {'name': 'round', 'type': save_int}, 'url': {'name': 'raceUrl', 'type': str}, 'raceName': {'name': 'raceName', 'type': str}, 'date': {'name': 'raceDate', 'type': date_from_ergast}, @@ -598,8 +598,8 @@ def _merge_dicts_of_lists(data): 'name': 'Status', 'type': list, 'method': _flatten_by_rename, - 'map': {'statusId': {'name': 'statusId', 'type': int}, - 'count': {'name': 'count', 'type': int}, + 'map': {'statusId': {'name': 'statusId', 'type': save_int}, + 'count': {'name': 'count', 'type': save_int}, 'status': {'name': 'status', 'type': str}}, 'sub': [], 'finalize': None