Skip to content

Commit d55edc1

Browse files
committed
fix mypy
1 parent fd273e9 commit d55edc1

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,
@@ -501,6 +502,7 @@ def from_netcdf(
501502
interp_method = interp_method[variable[0]]
502503
else:
503504
raise RuntimeError(f"interp_method is a dictionary but {variable[0]} is not in it")
505+
interp_method = cast(InterpMethodOption, interp_method)
504506

505507
if "lon" in dimensions and "lat" in dimensions:
506508
with NetcdfFileBuffer(

0 commit comments

Comments
 (0)