Skip to content

Commit

Permalink
[ENH] Add COL to driver dictionaries (#609)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1dc86a0)
  • Loading branch information
grahamjwhite authored and theOehrly committed Jul 5, 2024
1 parent 8040300 commit e96f931
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fastf1/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion fastf1/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)"""
Expand All @@ -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] = {
Expand Down

0 comments on commit e96f931

Please sign in to comment.