@@ -124,13 +124,13 @@ def __init__(self, frequency, api_data):
124124 ] #: The distance of the location of the provided forecast from the requested location
125125 self .name = api_data ["features" ][0 ]["properties" ]["location" ][
126126 "name"
127- ] #: The name of the location of the provided forecast
127+ ] #: The name of the location of the provided forecast
128128
129129 # N.B. Elevation is in metres above or below the WGS 84 reference
130130 # ellipsoid as per GeoJSON spec.
131131 self .elevation = api_data ["features" ][0 ]["geometry" ]["coordinates" ][
132132 2
133- ] #: The elevation of the location of the provided forecast
133+ ] #: The elevation of the location of the provided forecast
134134
135135 forecasts = api_data ["features" ][0 ]["properties" ]["timeSeries" ]
136136 parameters = api_data ["parameters" ][0 ]
@@ -260,7 +260,8 @@ def _check_requested_time(self, target):
260260 ] - datetime .timedelta (hours = 0 , minutes = 30 ):
261261 err_str = (
262262 "There is no forecast available for the requested time. "
263- + "The requested time is more than 30 minutes before the first available forecast"
263+ "The requested time is more than 30 minutes before the "
264+ "first available forecast."
264265 )
265266 raise APIException (err_str )
266267
@@ -271,7 +272,8 @@ def _check_requested_time(self, target):
271272 ] - datetime .timedelta (hours = 1 , minutes = 30 ):
272273 err_str = (
273274 "There is no forecast available for the requested time. "
274- + "The requested time is more than 1 hour and 30 minutes before the first available forecast"
275+ "The requested time is more than 1 hour and 30 minutes "
276+ "before the first available forecast."
275277 )
276278 raise APIException (err_str )
277279
@@ -282,7 +284,8 @@ def _check_requested_time(self, target):
282284 ] - datetime .timedelta (hours = 6 ):
283285 err_str = (
284286 "There is no forecast available for the requested time. "
285- + "The requested time is more than 6 hours before the first available forecast"
287+ "The requested time is more than 6 hours before the first "
288+ "available forecast."
286289 )
287290
288291 raise APIException (err_str )
@@ -292,7 +295,11 @@ def _check_requested_time(self, target):
292295 if self .frequency == "hourly" and target > (
293296 self .timesteps [- 1 ]["time" ] + datetime .timedelta (hours = 0 , minutes = 30 )
294297 ):
295- err_str = "There is no forecast available for the requested time. The requested time is more than 30 minutes after the first available forecast"
298+ err_str = (
299+ "There is no forecast available for the requested time. The "
300+ "requested time is more than 30 minutes after the first "
301+ "available forecast"
302+ )
296303
297304 raise APIException (err_str )
298305
@@ -301,7 +308,11 @@ def _check_requested_time(self, target):
301308 if self .frequency == "three-hourly" and target > (
302309 self .timesteps [- 1 ]["time" ] + datetime .timedelta (hours = 1 , minutes = 30 )
303310 ):
304- err_str = "There is no forecast available for the requested time. The requested time is more than 1.5 hours after the first available forecast"
311+ err_str = (
312+ "There is no forecast available for the requested time. The "
313+ "requested time is more than 1.5 hours after the first "
314+ "available forecast."
315+ )
305316
306317 raise APIException (err_str )
307318
@@ -310,7 +321,11 @@ def _check_requested_time(self, target):
310321 if self .frequency == "daily" and target > (
311322 self .timesteps [- 1 ]["time" ] + datetime .timedelta (hours = 6 )
312323 ):
313- err_str = "There is no forecast available for the requested time. The requested time is more than 6 hours after the first available forecast"
324+ err_str = (
325+ "There is no forecast available for the requested time. The "
326+ "requested time is more than 6 hours after the first available "
327+ "forecast."
328+ )
314329
315330 raise APIException (err_str )
316331
0 commit comments