theOehrly / Fast-F1

FastF1 is a python package for accessing and analyzing Formula 1 results, schedules, timing data and telemetry
https://docs.fastf1.dev
MIT License
2.54k stars 264 forks source link

Remove _DRIVER_TEAM_MAPPING in __init__.py #588

Closed Casper-Guo closed 6 months ago

Casper-Guo commented 6 months ago

Reference: #587

Thoughts on the appropriate exception to raise when we encounter this edge case? This relates to both the livetiming API and Ergast so raising either SessionNotAvailableError or ErgastError feels incomplete.

For the moment a blank exception might suffice since this code block is so rarely ran, to be replaced by something better when #541 is done.

theOehrly commented 6 months ago

Ahh, I was faster just a few minutes ago and already removed it when I was fixing/cleaning up some stuff related to live timing recordings. Sorry for that duplicate work.

See https://github.com/theOehrly/Fast-F1/commit/2814e506694f5dfec1e634ec266f1f9fdb2218b0

The way I fixed it, the "results" are still generated from timing data, but they only have the driver numbers. It's not really results then, but the driver list then exists. This means drivers can't be mapped to any specific team. But that's the only issue that should result from that.

Edit: Actually, we don't have the abbreviations either in those cases. But the only way around that would be hard-coded values again.