Skip to content

Commit

Permalink
Need to use typing.Dict instead of dict to support python < 3.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyCera-NOAA committed Feb 8, 2024
1 parent 8775969 commit fd3d9d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions grib2io/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

import datetime
import struct
from typing import Union, Type
from typing import Union, Type, Dict, List

import numpy as np
from numpy.typing import ArrayLike

from .. import tables

def int2bin(i: int, nbits: int=8, output: Union[Type[str], Type[list]]=str):
def int2bin(i: int, nbits: int=8, output: Union[Type[str], Type[List]]=str):
"""
Convert integer to binary string or list
Expand Down Expand Up @@ -139,7 +139,7 @@ def get_duration(pdtn: int, pdt: ArrayLike) -> datetime.timedelta:
return None


def decode_wx_strings(lus: bytes) -> dict[int, str]:
def decode_wx_strings(lus: bytes) -> Dict[int, str]:
"""
Decode GRIB2 Local Use Section to obtain NDFD/MDL Weather Strings.
Expand Down

0 comments on commit fd3d9d6

Please sign in to comment.