We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 487c380 commit 47b052cCopy full SHA for 47b052c
nicegui/event.py
@@ -30,7 +30,8 @@ class Callback(Generic[P]):
30
def run(self, *args: P.args, **kwargs: P.kwargs) -> Any:
31
"""Run the callback."""
32
with (self.slot and self.slot()) or nullcontext():
33
- return self.func(*args, **kwargs) if helpers.expects_arguments(self.func) else self.func()
+ expect_args = helpers.expects_arguments(self.func)
34
+ return self.func(*args, **kwargs) if expect_args else self.func() # type: ignore[call-arg]
35
36
async def await_result(self, result: Awaitable | AwaitableResponse | asyncio.Task) -> Any:
37
"""Await the result of the callback."""
0 commit comments