Skip to content
Snippets Groups Projects
Commit f84b0005 authored by Lennard Geese's avatar Lennard Geese
Browse files

Fix data-type mismatch that python somehow sidestepped the entire time

parent ad9db0e9
No related branches found
No related tags found
No related merge requests found
......@@ -26,15 +26,14 @@ class DataImporter(DataHandler, ABC):
x = 0
def importRaceSessions(self, races: list[Session], laps = True, telemetry = False, weather = True, messages = False):
def importRaceSessions(self, sessionIdentifiers: list[(int, int)], laps = True, telemetry = False, weather = True, messages = False):
sessions: list[Session] = []
for raceSession in races:
sessions.append(self.importSession(raceSession, "R", laps, weather, messages, telemetry))
for sessionIdentifier in sessionIdentifiers:
sessions.append(self.importSession(sessionIdentifier, "R", laps, weather, messages, telemetry))
return sessions
def importSession(self, session: Session, sessionType: str, laps = True, telemetry = False, weather = True, messages = False):
season, raceIndex = session
session = fastf1.get_session(season, raceIndex, sessionType)
def importSession(self, sessionIdentifier: (int, int), sessionType: str, laps = True, telemetry = False, weather = True, messages = False):
session = fastf1.get_session(sessionIdentifier[0], sessionIdentifier[1], sessionType)
session.load(laps = laps, telemetry = telemetry, weather = weather, messages = messages)
return session
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment