diff --git a/fastf1/core.py b/fastf1/core.py index 3538738b8..7fbdde49d 100644 --- a/fastf1/core.py +++ b/fastf1/core.py @@ -3060,18 +3060,17 @@ def pick_fastest(self, only_by_time: bool = False) -> "Lap": laps = self.loc[self['IsPersonalBest'] == True] # noqa: E712 if not laps.size: - warnings.warn(("None will be returned instead of an empty Lap " - "object when there are no laps that satisfies " - "the definition for fastest lap starting from " - "version 3.3"), - DeprecationWarning) + warnings.warn(("In the future, `None` will be returned instead of " + "an empty `Lap` object when there are no laps that " + "satisfy the definition for fastest lap."), + FutureWarning) return Lap(index=self.columns, dtype=object).__finalize__(self) if laps['LapTime'].isna().all(): - warnings.warn(("None will be returned instead of an empty Lap " - "object when there is no recorded LapTime for " - "any lap starting from version 3.3"), - DeprecationWarning) + warnings.warn(("In the future, `None` will be returned instead of " + "an empty `Lap` object when there is no recorded " + "LapTime for any lap."), + FutureWarning) return Lap(index=self.columns, dtype=object).__finalize__(self) lap = laps.loc[laps['LapTime'].idxmin()]