Skip to content

Commit 51a57b7

Browse files
committed
Fix typing
1 parent 7602d4b commit 51a57b7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/meteole/forecast.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,6 @@ def _grib_str_to_df(self, grib_str: bytes) -> pd.DataFrame:
394394
- The temporary file used for parsing is automatically deleted after use.
395395
- Ensure the input GRIB data is valid and encoded in a binary format.
396396
"""
397-
# Ensure grib_str is in bytes format
398-
if not isinstance(grib_str, (bytes, bytearray)):
399-
raise ValueError("grib_str must be a bytes or bytearray object.")
400397

401398
with tempfile.NamedTemporaryFile(delete=True) as temp_file:
402399
# Write the GRIB binary data to the temporary file
@@ -434,7 +431,7 @@ def _get_data_single_forecast(
434431
pd.DataFrame: The forecast for the specified time.
435432
"""
436433

437-
grib_str = self._get_coverage_file(
434+
grib_str: bytes = self._get_coverage_file(
438435
coverage_id=coverage_id,
439436
height=height,
440437
pressure=pressure,

0 commit comments

Comments
 (0)