Skip to content

Commit 5b02bac

Browse files
committed
Fix typing of plot._requires_plot
I don't know why it is complaining but this seems to keep mypy happy.
1 parent d8ea750 commit 5b02bac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/emsarray/plot/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any
1+
from typing import Any, Callable
22

33
from emsarray.utils import RequiresExtraException, requires_extra
44

@@ -52,4 +52,5 @@ def __getattr__(name: str) -> Any:
5252
]
5353

5454

55-
_requires_plot = requires_extra(extra='plot', import_error=IMPORT_EXCEPTION)
55+
type RequiresPlot[T] = Callable[[T], T]
56+
_requires_plot: RequiresPlot = requires_extra(extra='plot', import_error=IMPORT_EXCEPTION)

0 commit comments

Comments
 (0)