Skip to content

Commit 06cd7a9

Browse files
committed
fix mypy
1 parent 89593f2 commit 06cd7a9

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,
@@ -515,6 +516,7 @@ def from_netcdf(
515516
interp_method = interp_method[variable[0]]
516517
else:
517518
raise RuntimeError(f"interp_method is a dictionary but {variable[0]} is not in it")
519+
interp_method = cast(InterpMethodOption, interp_method)
518520

519521
if "lon" in dimensions and "lat" in dimensions:
520522
with NetcdfFileBuffer(

0 commit comments

Comments
 (0)