Skip to content

Commit 06c2e80

Browse files
committed
fix mypy
1 parent 2db7be1 commit 06c2e80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

parcels/field.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import warnings
44
from collections.abc import Iterable
55
from pathlib import Path
6-
from typing import TYPE_CHECKING
6+
from typing import TYPE_CHECKING, cast
77

88
import dask.array as da
99
import numpy as np
@@ -20,6 +20,7 @@
2020
from parcels._typing import (
2121
GridIndexingType,
2222
InterpMethod,
23+
InterpMethodOption,
2324
Mesh,
2425
VectorType,
2526
assert_valid_gridindexingtype,
@@ -519,6 +520,7 @@ def from_netcdf(
519520
interp_method = interp_method[variable[0]]
520521
else:
521522
raise RuntimeError(f"interp_method is a dictionary but {variable[0]} is not in it")
523+
interp_method = cast(InterpMethodOption, interp_method)
522524

523525
if "lon" in dimensions and "lat" in dimensions:
524526
with NetcdfFileBuffer(

0 commit comments

Comments
 (0)