Skip to content

Commit 47b052c

Browse files
ignore mypy error
1 parent 487c380 commit 47b052c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nicegui/event.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class Callback(Generic[P]):
3030
def run(self, *args: P.args, **kwargs: P.kwargs) -> Any:
3131
"""Run the callback."""
3232
with (self.slot and self.slot()) or nullcontext():
33-
return self.func(*args, **kwargs) if helpers.expects_arguments(self.func) else self.func()
33+
expect_args = helpers.expects_arguments(self.func)
34+
return self.func(*args, **kwargs) if expect_args else self.func() # type: ignore[call-arg]
3435

3536
async def await_result(self, result: Awaitable | AwaitableResponse | asyncio.Task) -> Any:
3637
"""Await the result of the callback."""

0 commit comments

Comments
 (0)