From e96f931a3b48372247a21e7c0d206a92bdfe6972 Mon Sep 17 00:00:00 2001 From: Graham White <9819480+grahamjwhite@users.noreply.github.com> Date: Sat, 6 Jul 2024 02:26:38 +1000 Subject: [PATCH] [ENH] Add COL to driver dictionaries (#609) (cherry picked from commit 1dc86a063e344f07150cab92f6721e894a5c856e) --- fastf1/events.py | 2 +- fastf1/plotting.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fastf1/events.py b/fastf1/events.py index 3a512420d..4709ca302 100644 --- a/fastf1/events.py +++ b/fastf1/events.py @@ -882,7 +882,7 @@ def __init__(self, *args, year: int = 0, if self[col].isna().all(): if _type == 'datetime64[ns]': self[col] = pd.NaT - elif _type == object: + elif _type == object: # noqa: E721, type comparison with == self[col] = None else: self[col] = _type() diff --git a/fastf1/plotting.py b/fastf1/plotting.py index 4d3169572..c8a547705 100644 --- a/fastf1/plotting.py +++ b/fastf1/plotting.py @@ -144,6 +144,7 @@ def warn_change(self): "alexander albon": "#005aff", "logan sargeant": "#012564", "zak osullivan": "#1b3d97", + "franco colapinto": "#639aff" } """Mapping of driver names to driver colors (hex color codes). (current season only)""" @@ -169,7 +170,7 @@ def warn_change(self): 'HAM': 'lewis hamilton', 'RUS': 'george russell', 'VES': 'frederik vesti', 'ALB': 'alexander albon', 'SAR': 'logan sargeant', - 'OSU': 'zak osullivan'} + 'OSU': 'zak osullivan', 'COL': 'franco colapinto'} """Mapping of driver names to theirs respective abbreviations.""" COMPOUND_COLORS: Dict[str, str] = {