Skip to content

Commit 4c6d724

Browse files
committed
Fix mypy typing for _requires_plot()
1 parent 83f4ca4 commit 4c6d724

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/emsarray/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,9 @@ def requires_extra[T](
736736
exception_class: type[RequiresExtraException] = RequiresExtraException,
737737
) -> Callable[[T], T]:
738738
if import_error is None:
739-
return lambda fn: fn
739+
def noop(fn: T) -> T:
740+
return fn
741+
return noop
740742

741743
def error_decorator(fn: T) -> T:
742744
@functools.wraps(fn) # type: ignore

0 commit comments

Comments
 (0)