From 3bc7e7b496298ad1f4248d8e52123bb675cdcf95 Mon Sep 17 00:00:00 2001 From: Gourav Kumar Date: Sat, 25 Jun 2022 13:20:44 +0530 Subject: [PATCH] black changes --- pyfacts/exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfacts/exceptions.py b/pyfacts/exceptions.py index 0e5e0ab..dbf0fc8 100644 --- a/pyfacts/exceptions.py +++ b/pyfacts/exceptions.py @@ -13,9 +13,9 @@ class DateNotFoundError(Exception): class DateOutOfRangeError(Exception): """Exception to be raised when provided date is outside the range of dates in the time series""" - def __init__(self, date: datetime.datetime, type: Literal['min', 'max']) -> None: - if type == 'min': + def __init__(self, date: datetime.datetime, type: Literal["min", "max"]) -> None: + if type == "min": message = f"Provided date {date} is before the first date in the TimeSeries" - if type == 'max': + if type == "max": message = f"Provided date {date} is after the last date in the TimeSeries" super().__init__(message)