Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
GratienDSX committed Jan 10, 2025
1 parent 7602d4b commit 51a57b7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/meteole/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,6 @@ def _grib_str_to_df(self, grib_str: bytes) -> pd.DataFrame:
- The temporary file used for parsing is automatically deleted after use.
- Ensure the input GRIB data is valid and encoded in a binary format.
"""
# Ensure grib_str is in bytes format
if not isinstance(grib_str, (bytes, bytearray)):
raise ValueError("grib_str must be a bytes or bytearray object.")

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

grib_str = self._get_coverage_file(
grib_str: bytes = self._get_coverage_file(
coverage_id=coverage_id,
height=height,
pressure=pressure,
Expand Down

0 comments on commit 51a57b7

Please sign in to comment.