Newer
Older
'''Defines variables that are needed for any type of interaction with FastF1's data. Any class utilizing FastF1
data in any way should be a subclass of the DataHandler class to inherit these variables.'''
def __init__(self):
self.numberOfDrivers = 20
self.invalidDriverId = "NO_DRIVER"
self.activateDebugOvertakeAnalysis = False
self.firstFastF1Year: int = 2018
'''Uniquely identifies a single session without having to load or create the Session object'''
year: int
event: int | str
sessionType: str
def __init__(self, year: int, event: int | str, sessionType: str = "R"):
self.year = year
self.event = event
self.sessionType = sessionType
class WeatherChangeWindow:
'''Identifies a window of laps, during which a weather change took place. A WeatherChangeWindow is itself not
associated with a SessionObject or a SessionIdentifier. This association must be made and maintained by whatever
object or function is using an object of this class.'''
firstLap: int
lastLap: int
def __init__(self, firstTireChange: int, lastTireChange: int):
self.firstLap = firstTireChange - 1
self.lastLap = lastTireChange + 1