Skip to content

Commit 126560e

Browse files
committed
Use type: ignore[override]
Because xr.core.types.ReadBuffer is not available until xarray 2024.11.0, xref pydata/xarray#9787
1 parent 98910f8 commit 126560e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pygmt/xarray_backend.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
from pygmt.helpers import build_arg_list
1313
from pygmt.src.which import which
1414
from xarray.backends import BackendEntrypoint
15-
from xarray.backends.common import AbstractDataStore
16-
from xarray.core.types import ReadBuffer
1715

1816

1917
class GMTReadBackendEntrypoint(BackendEntrypoint):
@@ -24,13 +22,13 @@ class GMTReadBackendEntrypoint(BackendEntrypoint):
2422
GeoTIFF files.
2523
"""
2624

27-
description = "Open .nc and .tif files in Xarray via GMT read."
25+
description = "Open raster (.grd, .nc or .tif) files in Xarray via GMT read."
2826
open_dataset_parameters = ("filename_or_obj", "kind")
2927
url = "https://github.com/GenericMappingTools/pygmt"
3028

31-
def open_dataset(
29+
def open_dataset( # type: ignore[override]
3230
self,
33-
filename_or_obj: str | os.PathLike | ReadBuffer | AbstractDataStore,
31+
filename_or_obj: str | os.PathLike,
3432
*,
3533
drop_variables=None, # noqa: ARG002
3634
decode_kind: Literal["grid", "image"] | None = None,

0 commit comments

Comments
 (0)